From: Edwin Leuven Date: Sun, 21 Mar 2010 11:50:13 +0000 (+0000) Subject: - make the advanced search/replace dialog play nice with size X-Git-Tag: 2.0.0~3742 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ffaf5125934139a9cbffdfafabc264453df1a372;p=features.git - make the advanced search/replace dialog play nice with size - add frame git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33821 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/FindAndReplace.cpp b/src/frontends/qt4/FindAndReplace.cpp index a172ee147e..42628d7a71 100644 --- a/src/frontends/qt4/FindAndReplace.cpp +++ b/src/frontends/qt4/FindAndReplace.cpp @@ -58,12 +58,13 @@ FindAndReplaceWidget::FindAndReplaceWidget(GuiView & view) #endif find_work_area_->setGuiView(view_); find_work_area_->init(); + find_work_area_->setFrameStyle(QFrame::StyledPanel); setFocusProxy(find_work_area_); replace_work_area_->setGuiView(view_); replace_work_area_->init(); + replace_work_area_->setFrameStyle(QFrame::StyledPanel); // We don't want two cursors blinking. replace_work_area_->stopBlinkingCursor(); - QMenu * menu = new QMenu(); QAction * regAny = menu->addAction(qt_("&Anything")); regAny->setData(".*"); diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index c418184ab5..0fa43708e1 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1280,6 +1280,18 @@ void EmbeddedWorkArea::hideEvent(QHideEvent * ev) } +QSize EmbeddedWorkArea::sizeHint () const +{ + // FIXME(?): + // GuiWorkArea sets the size to the screen's viewport + // by returning a value this gets overridden + // EmbeddedWorkArea is now sized to fit in the layout + // of the parent, and has a minimum size set in GuiWorkArea + // which is what we return here + return QSize(100, 70); +} + + void EmbeddedWorkArea::disable() { stopBlinkingCursor(); diff --git a/src/frontends/qt4/GuiWorkArea.h b/src/frontends/qt4/GuiWorkArea.h index d4a081898f..f38018fa4f 100644 --- a/src/frontends/qt4/GuiWorkArea.h +++ b/src/frontends/qt4/GuiWorkArea.h @@ -281,6 +281,7 @@ public: void setWidgetResizable(bool) {} void setWidget(QWidget *) {} + QSize sizeHint () const; /// void disable(); diff --git a/src/frontends/qt4/ui/FindAndReplaceUi.ui b/src/frontends/qt4/ui/FindAndReplaceUi.ui index 91f8db523c..4cc98a7491 100644 --- a/src/frontends/qt4/ui/FindAndReplaceUi.ui +++ b/src/frontends/qt4/ui/FindAndReplaceUi.ui @@ -5,735 +5,448 @@ 0 0 - 327 - 523 + 288 + 366 - - - 1 - 7 - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 0 - 0 - - Find LyX Text - - - + + + Qt::NoFocus - - true + + + + + + + + false + + + 0 - - - - 0 - 0 - 289 - 532 - + + + + 0 + 0 + + + Qt::NoFocus + + + + + + + + + &Basic + - - - - 7 - 7 - 0 - 0 - + + + &Find: - - Qt::NoFocus + + find_work_area_ + + + + - - - - - - - false - - - 0 + Enter the text to search for in this full-featured LyX editing area - + + + + 0 + 0 + 192 + 57 + + - - 5 - 7 + 0 0 - - Qt::NoFocus - - - - - - - - - &Basic - - - - - - - 7 - 7 - 0 - 0 - - - - - - - QFrame::Box - - - QFrame::Raised - - - - 4 - - - 0 - - - - - - 7 - 7 - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Enter the text to replace in this full-featured LyX editing area - - - &Replace with... - - - - 4 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Enter the text to replace in this full-featured LyX editing area - - - true - - - - - 0 - 0 - 221 - 80 - - - - - 7 - 7 - 0 - 0 - - - - - - - - - true - - - - 7 - 1 - 1 - 0 - - - - Replace and find next occurrence [Enter] - - - Ne&xt - - - - - - - true - - - - 7 - 1 - 1 - 0 - - - - Replace and find previous occurrence [Shift+Enter] - - - Pre&vious - - - - - - - false - - - - 7 - 1 - 0 - 0 - - - - Replace all occurences at once - - - Replace &All - - - - - - - - 7 - 1 - 1 - 0 - - - - Keep the case of the replacement's first letter as in each matching text first letter - - - &Keep case - - - - - - - - - - - - - - 7 - 7 - 0 - 0 - - - - QFrame::Box - - - QFrame::Raised - - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 0 - 0 - - - - Enter the text to search for in this full-featured LyX editing area - - - &Find... - - - - 4 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Enter the text to search for in this full-featured LyX editing area - - - true - - - - - 0 - 0 - 221 - 79 - - - - - 7 - 7 - 0 - 0 - - - - - - - - - - 7 - 1 - 0 - 0 - - - - Perform a case-sensitive search - - - Case &sensitive - - - - - - - - 3 - 0 - 0 - 0 - - - - Choose one of the pre-arranged regular expressions. - - - Insert Re&gular Expression... - - - - - - - true - - - - 7 - 1 - 0 - 0 - - - - Find next occurrence [Enter] - - - &Next - - - true - - - - - - - true - - - - 7 - 1 - 0 - 0 - - - - Find previous occurrence [Shift+Enter] - - - &Previous - - - true - - - - - - - true - - - - 7 - 1 - 0 - 0 - - - - Restrict search to whole words only - - - Whole &words - - - - - - - - - - - + + + + + + Perform a case-sensitive search + + + Case &sensitive + + + + + + + true + + + Restrict search to whole words only + + + Whole &words + + + + + + + Choose one of the pre-arranged regular expressions. + + + Insert Re&gular Expression... + + + + + + + &Replace with: + + + replace_work_area_ + + + + + + + Enter the text to replace in this full-featured LyX editing area + + + + + 0 + 0 + 202 + 57 + + - - 7 - 7 + 0 0 - - + + + + + + + + + true + + + Find previous occurrence [Shift+Enter] + + + Find &Previous + + + true + + + + + + + true + + + Find next occurrence [Enter] + + + Find &Next + + + true + + + + + + + true + + + Replace and find previous occurrence [Shift+Enter] + + + Replace Pre&vious + + + + + + + true + + + Replace and find next occurrence [Enter] + + + Replace Ne&xt + + + + + + + false + + + Replace all occurences at once + + + Replace &All + + + + + + + + + + + 0 + 0 + + + + + + + + + + &Advanced + + + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + The scope to which the search horizon is restricted + + + false + + + Sco&pe + + + false + + + + 3 - - + + 0 - - &Advanced - - - - - - QLayout::SetDefaultConstraint - - - - - true - - - - 7 - 1 - 0 - 0 - - - - - 0 - 0 - - - - The scope to which the search horizon is restricted - - - false - - - Sco&pe - - - false - - - - 3 - - - 0 - - - - - false - - - - 1 - 1 - 0 - 0 - - - - Current paragraph - - - Current &paragraph - - - false - - - - - - - true - - - - 1 - 1 - 0 - 0 - - - - Current &document - - - true - - - - - - - true - - - - 1 - 1 - 0 - 0 - - - - Current document and all related documents belonging to the same master document - - - &Master document - - - - - - - true - - - - 1 - 1 - 0 - 0 - - - - All open documents - - - &Open documents - - - - - - - true - - - - 1 - 1 - 0 - 0 - - - - All ma&nuals - - - - - - - - - - false - - - - 7 - 1 - 0 - 0 - - - - &Expand macros - - - - - - - true - - - - 7 - 1 - 0 - 0 - - - - If unchecked, the search will be limited to occurrences of the selected text and paragraph style - - - Ignore &format - - - true - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - - - - - + + + + false + + + + 0 + 0 + + + + Current paragraph + + + Current &paragraph + + + false + + + + + + + true + + + + 0 + 0 + + + + Current &document + + + true + + + + + + + true + + + + 0 + 0 + + + + Current document and all related documents belonging to the same master document + + + &Master document + + + + + + + true + + + + 0 + 0 + + + + All open documents + + + &Open documents + + + + + + + true + + + + 0 + 0 + + + + All ma&nuals + + + + + + + + + + true + + + + 0 + 0 + + + + If unchecked, the search will be limited to occurrences of the selected text and paragraph style + + + Ignore &format + + + true + + + + + + + + 1 + 0 + + + + Keep the case of the replacement's first letter as in each matching text first letter + + + &Preserve first case on replace + + + + + false + + + + 0 + 0 + + + + &Expand macros + + + + + + + Qt::Vertical + + + + 13 + 168 + + + +