summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-05-02 14:00:01 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-06-01 10:06:29 +0200
commit520be8ed51427aa1265e2b6885abfc7fe65524a2 (patch)
treeeded5c11886d01390b4eebc0019fdac6de659242 /vcl
parentcb2f87b04c62d0a0fd2cb127519d5bdab86d5939 (diff)
Native focus rectangles for radiobuttons
that suffer from the same problem (lack of transparency) as those of checkboxes Change-Id: I4bb81c5f95b07e57a7d6cdb86ba4e31ec7660f5a
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/kde5/KDE5SalGraphics.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 849865641fb1..e110c0b04722 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -81,12 +81,12 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa
switch (type)
{
case ControlType::Pushbutton:
- case ControlType::Radiobutton:
case ControlType::Tooltip:
case ControlType::Progress:
case ControlType::ListNode:
return (part == ControlPart::Entire);
+ case ControlType::Radiobutton:
case ControlType::Checkbox:
return (part == ControlPart::Entire) || (part == ControlPart::Focus);
@@ -501,9 +501,18 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
}
else if (type == ControlType::Radiobutton)
{
- QStyleOptionButton option;
- draw( QStyle::CE_RadioButton, &option, m_image.get(),
- vclStateValue2StateFlag(nControlState, value) );
+ if (part == ControlPart::Entire)
+ {
+ QStyleOptionButton option;
+ draw( QStyle::CE_RadioButton, &option, m_image.get(),
+ vclStateValue2StateFlag(nControlState, value) );
+ }
+ else if (part == ControlPart::Focus)
+ {
+ QStyleOptionFocusRect option;
+ draw( QStyle::PE_FrameFocusRect, &option, m_image.get(),
+ vclStateValue2StateFlag(nControlState, value) );
+ }
}
else if (type == ControlType::Tooltip)
{