From e454deba2c2e002214fc9e156cbbbcf3963cddd6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 5 May 2023 21:23:21 +0200 Subject: [PATCH] Revert "Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section" I pushed it by mistake. This reverts commit 4d31e20d7d790554aab655ae11c9cd0dd4a6d6f1. --- src/frontends/qt/GuiPrefs.cpp | 40 +++++----- src/frontends/qt/ui/PrefEditUi.ui | 117 +++++++++++++++++++++++++++++ src/frontends/qt/ui/PrefUi.ui | 121 +----------------------------- 3 files changed, 139 insertions(+), 139 deletions(-) diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index a2ac0c83eb..4fb3452177 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -2619,16 +2619,6 @@ PrefUserInterface::PrefUserInterface(GuiPreferences * form) this, SIGNAL(changed())); connect(tooltipCB, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(toggleTabbarCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); - connect(toggleMenubarCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); - connect(toggleScrollbarCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); - connect(toggleStatusbarCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); - connect(toggleToolbarsCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); lastfilesSB->setMaximum(maxlastfiles); iconSetCO->addItem(qt_("Default"), QString()); @@ -2650,11 +2640,6 @@ void PrefUserInterface::applyRC(LyXRC & rc) const rc.use_system_theme_icons = useSystemThemeIconsCB->isChecked(); rc.num_lastfiles = lastfilesSB->value(); rc.use_tooltip = tooltipCB->isChecked(); - rc.full_screen_toolbars = toggleToolbarsCB->isChecked(); - rc.full_screen_scrollbar = toggleScrollbarCB->isChecked(); - rc.full_screen_statusbar = toggleStatusbarCB->isChecked(); - rc.full_screen_tabbar = toggleTabbarCB->isChecked(); - rc.full_screen_menubar = toggleMenubarCB->isChecked(); } @@ -2668,11 +2653,6 @@ void PrefUserInterface::updateRC(LyXRC const & rc) uiFileED->setText(toqstr(external_path(rc.ui_file))); lastfilesSB->setValue(rc.num_lastfiles); tooltipCB->setChecked(rc.use_tooltip); - toggleScrollbarCB->setChecked(rc.full_screen_scrollbar); - toggleStatusbarCB->setChecked(rc.full_screen_statusbar); - toggleToolbarsCB->setChecked(rc.full_screen_toolbars); - toggleTabbarCB->setChecked(rc.full_screen_tabbar); - toggleMenubarCB->setChecked(rc.full_screen_menubar); } @@ -2839,6 +2819,16 @@ PrefEdit::PrefEdit(GuiPreferences * form) this, SIGNAL(changed())); connect(screenWidthUnitCO, SIGNAL(selectionChanged(lyx::Length::UNIT)), this, SIGNAL(changed())); + connect(toggleTabbarCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); + connect(toggleMenubarCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); + connect(toggleScrollbarCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); + connect(toggleStatusbarCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); + connect(toggleToolbarsCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); } @@ -2874,6 +2864,11 @@ void PrefEdit::applyRC(LyXRC & rc) const rc.cursor_width = cursorWidthSB->value(); rc.citation_search = citationSearchCB->isChecked(); rc.citation_search_pattern = fromqstr(citationSearchLE->text()); + rc.full_screen_toolbars = toggleToolbarsCB->isChecked(); + rc.full_screen_scrollbar = toggleScrollbarCB->isChecked(); + rc.full_screen_statusbar = toggleStatusbarCB->isChecked(); + rc.full_screen_tabbar = toggleTabbarCB->isChecked(); + rc.full_screen_menubar = toggleMenubarCB->isChecked(); rc.screen_width = Length(widgetsToLength(screenWidthLE, screenWidthUnitCO)); rc.screen_limit = screenLimitCB->isChecked(); } @@ -2893,6 +2888,11 @@ void PrefEdit::updateRC(LyXRC const & rc) citationSearchLE->setText(toqstr(rc.citation_search_pattern)); citationSearchLE->setEnabled(rc.citation_search); citationSearchLA->setEnabled(rc.citation_search); + toggleScrollbarCB->setChecked(rc.full_screen_scrollbar); + toggleStatusbarCB->setChecked(rc.full_screen_statusbar); + toggleToolbarsCB->setChecked(rc.full_screen_toolbars); + toggleTabbarCB->setChecked(rc.full_screen_tabbar); + toggleMenubarCB->setChecked(rc.full_screen_menubar); lengthToWidgets(screenWidthLE, screenWidthUnitCO, rc.screen_width, Length::defaultUnit()); screenWidthUnitCO->setEnabled(rc.screen_limit); screenLimitCB->setChecked(rc.screen_limit); diff --git a/src/frontends/qt/ui/PrefEditUi.ui b/src/frontends/qt/ui/PrefEditUi.ui index 79820b7c7d..a8cff2f83f 100644 --- a/src/frontends/qt/ui/PrefEditUi.ui +++ b/src/frontends/qt/ui/PrefEditUi.ui @@ -272,6 +272,123 @@ + + + Fullscreen + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + Hide &menubar + + + + + + + Hide scr&ollbar + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + Hide sta&tusbar + + + + + + + H&ide tabbar + + + + + + + Qt::Horizontal + + + + 146 + 38 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + &Hide toolbars + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + Qt::Vertical diff --git a/src/frontends/qt/ui/PrefUi.ui b/src/frontends/qt/ui/PrefUi.ui index d7551cbb3d..fcc1d3745c 100644 --- a/src/frontends/qt/ui/PrefUi.ui +++ b/src/frontends/qt/ui/PrefUi.ui @@ -6,8 +6,8 @@ 0 0 - 556 - 476 + 426 + 340 @@ -187,123 +187,6 @@ - - - Fullscreen - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - Hide &menubar - - - - - - - Hide scr&ollbar - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - Hide sta&tusbar - - - - - - - H&ide tabbar - - - - - - - Qt::Horizontal - - - - 146 - 38 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - - 0 - 0 - - - - &Hide toolbars - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - Qt::Vertical -- 2.39.2