Mercurial > octave
changeset 22611:95aff68c443d stable
gui: style fixes for pushbutton, radiobutton and checkbox (Bug #49247)
* libgui/graphics/BaseControl.cc
(QtHandles::updatePalette): handle radio and checkbox colors same as pushbutton and togglebutton
* libgui/src/octave-gui.cc
(toplevel): Include <QStyleFactory>
(gui_application::execute): call application setStyle(windows) in OS_WIN32
author | John D |
---|---|
date | Mon, 10 Oct 2016 17:34:38 -0400 |
parents | 8ba5e58a770f |
children | c05377052b50 78b3c48be3e6 |
files | libgui/graphics/BaseControl.cc libgui/src/octave-gui.cc |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/BaseControl.cc Mon Oct 10 22:03:05 2016 +0200 +++ b/libgui/graphics/BaseControl.cc Mon Oct 10 17:34:38 2016 -0400 @@ -51,7 +51,9 @@ Utils::fromRgb (props.get_foregroundcolor_rgb ())); } else if (props.style_is ("pushbutton") - || props.style_is ("togglebutton")) + || props.style_is ("togglebutton") + || props.style_is ("radiobutton") + || props.style_is ("checkbox")) { p.setColor (QPalette::Button, Utils::fromRgb (props.get_backgroundcolor_rgb ()));
--- a/libgui/src/octave-gui.cc Mon Oct 10 22:03:05 2016 +0200 +++ b/libgui/src/octave-gui.cc Mon Oct 10 17:34:38 2016 -0400 @@ -29,6 +29,7 @@ #include <QThread> #include <QTranslator> #include <QtGlobal> +#include <QStyleFactory> #include <cstdio> @@ -158,6 +159,11 @@ QTextCodec::setCodecForLocale (QTextCodec::codecForName ("UTF-8")); #endif + // set windows style for windows +#if defined (Q_OS_WIN32) + qt_app.setStyle(QStyleFactory::create("Windows")); +#endif + bool start_gui = start_gui_p (); // Show welcome wizard if this is the first run.