From 3f65441dc8e1aaecf759bb89d7f8cd988f380ac0 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 26 Sep 2019 04:25:49 +1000 Subject: [PATCH] various minor adjustments --- app/dialog/preferences/tabs/preferencesgeneraltab.cpp | 1 + app/ui/style/olive-dark/style.css | 5 +++++ app/ui/style/olive-light/palette.ini | 3 ++- app/ui/style/olive-light/style.css | 3 +++ app/window/mainwindow/mainmenu.cpp | 8 ++++++++ app/window/mainwindow/mainmenu.h | 5 +++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/dialog/preferences/tabs/preferencesgeneraltab.cpp b/app/dialog/preferences/tabs/preferencesgeneraltab.cpp index a9f456ab8..e90985b88 100644 --- a/app/dialog/preferences/tabs/preferencesgeneraltab.cpp +++ b/app/dialog/preferences/tabs/preferencesgeneraltab.cpp @@ -81,6 +81,7 @@ PreferencesGeneralTab::PreferencesGeneralTab() // General -> Default Sequence Settings QPushButton* default_sequence_settings = new QPushButton(tr("Default Sequence Settings")); + default_sequence_settings->setEnabled(false); connect(default_sequence_settings, SIGNAL(clicked(bool)), this, SLOT(edit_default_sequence_settings())); misc_general->addWidget(default_sequence_settings); diff --git a/app/ui/style/olive-dark/style.css b/app/ui/style/olive-dark/style.css index 76cb5bf54..bf3fef323 100644 --- a/app/ui/style/olive-dark/style.css +++ b/app/ui/style/olive-dark/style.css @@ -18,6 +18,11 @@ ***/ +/* Hack that forces checked QPushButtons to use dark color */ +QPushButton:checked { + background: #191919; +} + /* Node styling */ NodeViewItemWidget { qproperty-titlebarColor: #4040a0; diff --git a/app/ui/style/olive-light/palette.ini b/app/ui/style/olive-light/palette.ini index 5bdd02051..367ee06b3 100644 --- a/app/ui/style/olive-light/palette.ini +++ b/app/ui/style/olive-light/palette.ini @@ -14,4 +14,5 @@ Window=#D0D0D0 WindowText=#000000 [Disabled] -ButtonText=#D0D0D0 +ButtonText=#808080 +Text=#808080 diff --git a/app/ui/style/olive-light/style.css b/app/ui/style/olive-light/style.css index fed59b174..300445ac7 100644 --- a/app/ui/style/olive-light/style.css +++ b/app/ui/style/olive-light/style.css @@ -18,6 +18,9 @@ ***/ +/* Hack that forces checked QPushButtons to use dark color */ + + /* Node styling */ NodeViewItemWidget { qproperty-titlebarColor: #a0a0ff; diff --git a/app/window/mainwindow/mainmenu.cpp b/app/window/mainwindow/mainmenu.cpp index e16bbb616..415be884a 100644 --- a/app/window/mainwindow/mainmenu.cpp +++ b/app/window/mainwindow/mainmenu.cpp @@ -193,6 +193,7 @@ MainMenu::MainMenu(QMainWindow *parent) : // WINDOW MENU // window_menu_ = new Menu(this, this, SLOT(WindowMenuAboutToShow())); + connect(window_menu_, SIGNAL(aboutToHide()), this, SLOT(WindowMenuAboutToHide())); window_menu_separator_ = window_menu_->addSeparator(); window_maximize_panel_item_ = window_menu_->AddItem("maximizepanel", parent, SLOT(ToggleMaximizedPanel()), "`"); window_lock_layout_item_ = window_menu_->AddItem("lockpanels", olive::panel_manager, SLOT(SetPanelsLocked(bool))); @@ -363,6 +364,13 @@ void MainMenu::WindowMenuAboutToShow() window_lock_layout_item_->setChecked(olive::panel_manager->ArePanelsLocked()); } +void MainMenu::WindowMenuAboutToHide() +{ + while (window_menu_->actions().first() != window_menu_separator_) { + window_menu_->removeAction(window_menu_->actions().first()); + } +} + void MainMenu::ZoomInTriggered() { olive::panel_manager->CurrentlyFocused()->ZoomIn(); diff --git a/app/window/mainwindow/mainmenu.h b/app/window/mainwindow/mainmenu.h index 81371219f..913133473 100644 --- a/app/window/mainwindow/mainmenu.h +++ b/app/window/mainwindow/mainmenu.h @@ -72,6 +72,11 @@ private slots: */ void WindowMenuAboutToShow(); + /** + * @brief Slot triggered just before the Window menu hides + */ + void WindowMenuAboutToHide(); + /** * @brief Slot for zooming in *