Kaydet (Commit) b602cf58 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Adolfo Jayme Barrientos

gtk3: native focus rects are fine for flat buttons

(cherry picked from commit f485b288)

Change-Id: I6a70696cd119e681b4850c624c9e4ff28312c152
Reviewed-on: https://gerrit.libreoffice.org/17291Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
üst 96f36158
......@@ -266,7 +266,8 @@ struct ImplSVNWFData
// toolbox dropdown buttons
bool mbFlatMenu:1; // no popup 3D border
bool mbOpenMenuOnF10:1; // on gnome the first menu opens on F10
bool mbNoFocusRects:1; // on Aqua focus rects are not used
bool mbNoFocusRects:1; // on Aqua/Gtk3 use native focus rendering, except for flat butttons
bool mbNoFocusRectsForFlatButtons:1; // on Gtk3 native focusing is also preferred for flat buttons
bool mbCenteredTabs:1; // on Aqua, tabs are centered
bool mbNoActiveTabTextRaise:1; // on Aqua the text for the selected tab
// should not "jump up" a pixel
......
......@@ -699,8 +699,11 @@ void PushButton::ImplInitSettings( bool bFont,
EnableChildTransparentMode( true );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
SetPaintTransparent( true );
mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON) == 0
&& ImplGetSVData()->maNWFData.mbNoFocusRects;
if ((GetStyle() & WB_FLATBUTTON) == 0)
mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
else
mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRectsForFlatButtons;
}
else
{
......
......@@ -1933,6 +1933,7 @@ void GtkData::initNWF()
pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
pSVData->maNWFData.mbDDListBoxNoTextArea = true;
pSVData->maNWFData.mbNoFocusRects = true;
pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
}
void GtkData::deInitNWF()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment