sfx2/source/control/templateviewitem.cxx | 7 ++++--- sfx2/source/control/thumbnailviewitem.cxx | 7 ++++--- vcl/source/app/settings.cxx | 6 ++++-- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 6 ++++++ 4 files changed, 18 insertions(+), 8 deletions(-)
New commits: commit f801664dc5be75e4a89f1658efa3039b2dfa5367 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Aug 22 16:03:56 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Aug 25 10:07:37 2020 +0200 Derive ActiveColor as a brighter HighlightColor and use it opaque in thumbnail views so the selected item is always Highlighted but appears brighter when hovered over, leaving the non-selected items using transparent Highlight Change-Id: If0cbc05b779d230332e821aa7fac68a08ac40c41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101184 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx index c1b6609698de..3dd20a30fd64 100644 --- a/sfx2/source/control/templateviewitem.cxx +++ b/sfx2/source/control/templateviewitem.cxx @@ -63,10 +63,11 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces if( mbSelected && mbHover) aFillColor = pAttrs->aSelectHighlightColor; else if (mbSelected || mbHover) + { aFillColor = pAttrs->aHighlightColor; - - if (mbHover) - fTransparence = pAttrs->fHighlightTransparence; + if (mbHover) + fTransparence = pAttrs->fHighlightTransparence; + } aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea,5,5).getB2DPolygon()), diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index b3be4b5357c9..bd75307faff1 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -150,10 +150,11 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc if( mbSelected && mbHover) aFillColor = pAttrs->aSelectHighlightColor; else if (mbSelected || mbHover) + { aFillColor = pAttrs->aHighlightColor; - - if (mbHover) - fTransparence = pAttrs->fHighlightTransparence; + if (mbHover) + fTransparence = pAttrs->fHighlightTransparence; + } sal_uInt32 nPrimitive = 0; aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 340aebf92435..cb5efc485187 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -681,8 +681,6 @@ void ImplStyleData::SetStandardStyles() maFieldColor = COL_WHITE; maFieldTextColor = COL_BLACK; maFieldRolloverTextColor = COL_BLACK; - maActiveColor = COL_BLUE; - maActiveTextColor = COL_WHITE; maActiveBorderColor = COL_LIGHTGRAY; maDeactiveColor = COL_GRAY; maDeactiveTextColor = COL_LIGHTGRAY; @@ -699,6 +697,10 @@ void ImplStyleData::SetStandardStyles() maMenuHighlightTextColor = COL_WHITE; maHighlightColor = COL_BLUE; maHighlightTextColor = COL_WHITE; + // make active like highlight, except with a small contrast + maActiveColor = maHighlightColor; + maActiveColor.IncreaseLuminance(32); + maActiveTextColor = maHighlightTextColor; maActiveTabColor = COL_WHITE; maInactiveTabColor = COL_LIGHTGRAY; maTabTextColor = COL_BLACK; diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index e7ec07754256..465ce68a620e 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -3097,6 +3097,12 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) ::Color aHighlightTextColor = getColor( text_color ); aStyleSet.SetHighlightColor( aHighlightColor ); aStyleSet.SetHighlightTextColor( aHighlightTextColor ); + // make active like highlight, except with a small contrast. Note, see + // a GtkListBoxRow in a GtkStackSidebar for a gtk widget with a + // difference between highlighted and highlighted with focus. + aHighlightColor.IncreaseLuminance(16); + aStyleSet.SetActiveColor( aHighlightColor ); + aStyleSet.SetActiveTextColor( aHighlightTextColor ); // field background color GdkRGBA field_background_color; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits