diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-05-02 16:42:56 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-01 10:06:29 +0200 |
commit | af6435b678561f620c367694df56268aa9d63627 (patch) | |
tree | cee67803b6f8248c8ea2a64e97c9079ac9827fda /vcl | |
parent | 520be8ed51427aa1265e2b6885abfc7fe65524a2 (diff) |
Native focus rectangles for push buttons
far from perfect, they also hide the button text (but at least focus
frame in contrast colour is visible)
Change-Id: I9a7c2b429ae14b8604f894de64a7328cde6cb270
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde5/KDE5SalGraphics.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx index e110c0b04722..13b791943199 100644 --- a/vcl/unx/kde5/KDE5SalGraphics.cxx +++ b/vcl/unx/kde5/KDE5SalGraphics.cxx @@ -80,7 +80,6 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa { switch (type) { - case ControlType::Pushbutton: case ControlType::Tooltip: case ControlType::Progress: case ControlType::ListNode: @@ -88,6 +87,7 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa case ControlType::Radiobutton: case ControlType::Checkbox: + case ControlType::Pushbutton: return (part == ControlPart::Entire) || (part == ControlPart::Focus); case ControlType::Menubar: @@ -203,7 +203,10 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part, m_image->fill(QApplication::palette().color(QPalette::ToolTipBase).rgb()); break; case ControlType::Pushbutton: - m_image->fill(QApplication::palette().color(QPalette::Button).rgb()); + if ( nControlState & ControlState::FOCUSED ) + m_image->fill(QApplication::palette().color(QPalette::Highlight).rgb()); + else + m_image->fill(QApplication::palette().color(QPalette::Button).rgb()); break; case ControlType::Scrollbar: if ((part == ControlPart::DrawBackgroundVert) |