[education/rkward] rkward: Set breeze style on Windows and Mac; comments

Thomas Friedrichsmeier null at kde.org
Tue Mar 29 20:43:10 BST 2022

Git commit b0186fe7ed0656ea937e654123b90562c5ad276d by Thomas Friedrichsmeier.
Committed on 29/03/2022 at 19:42.
Pushed by tfry into branch 'master'.

Set breeze style on Windows and Mac; comments

M  +4    -0    rkward/main.cpp
M  +3    -0    rkward/windows/rktoplevelwindowgui.cpp


diff --git a/rkward/main.cpp b/rkward/main.cpp
index 7dcb34a5..87eb9767 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -250,6 +250,10 @@ int main (int argc, char *argv[]) {
 	QApplication app (argc, argv);
 	KCrash::setDrKonqiEnabled (true);
+#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
+	// Follow the example of kate, and use breeze theme on Windows and Mac, which appears to work best
+	QApplication::setStyle(QStringLiteral("breeze"));
 	// Don't complain when linking rkward://-pages from Rd pages
 	KUrlAuthorized::allowUrlAction ("redirect", QUrl("http://"), QUrl ("rkward://"));
diff --git a/rkward/windows/rktoplevelwindowgui.cpp b/rkward/windows/rktoplevelwindowgui.cpp
index 2ff0a2b9..ea35d143 100644
--- a/rkward/windows/rktoplevelwindowgui.cpp
+++ b/rkward/windows/rktoplevelwindowgui.cpp
@@ -104,8 +104,11 @@ RKTopLevelWindowGUI::RKTopLevelWindowGUI(KXmlGuiWindow *for_window) : QObject(fo
 	// settings
 	KStandardAction::keyBindings (this, SLOT (configureShortcuts()), actionCollection ());
 	KStandardAction::configureToolbars (this, SLOT (configureToolbars()), actionCollection ());
+	// Color scheme action. NOTE: selection is non-permanent for KF5 <= 5.87.0, auto-saved afterwards. Apparently, auto-save cannot be implemented for earlier versions within a few lines of code
 	KColorSchemeManager *manager = new KColorSchemeManager(this);
 	actionCollection()->addAction(QStringLiteral("colorscheme_menu"), manager->createSchemeSelectionMenu(QString(), this));
++       // our "status bar" is inlined, and always visible. Action below would only hide and show a useless proxy
++       // KF6 TODO: Still needed at all?
 	QAction *a = for_window->action("options_show_statusbar");
 	if (a) a->setVisible(false);

More information about the rkward-tracker mailing list