parent
b1512062a0
commit
f3895008e0
@ -0,0 +1,102 @@
|
|||||||
|
From fd4b20efbb734f5a82c636ded2ec65dcb46c5129 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||||
|
Date: Mon, 12 May 2014 14:06:37 +0100
|
||||||
|
Subject: [PATCH] Resolves: rhbz#1096295 hard to distinguish selected from
|
||||||
|
mouseover
|
||||||
|
|
||||||
|
Change-Id: Id6c11afd161bea15266a54a595bf7ee305e954f0
|
||||||
|
---
|
||||||
|
.../ui/slidesorter/inc/view/SlsPageObjectPainter.hxx | 1 +
|
||||||
|
sd/source/ui/slidesorter/inc/view/SlsTheme.hxx | 1 +
|
||||||
|
sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx | 15 ++++++++-------
|
||||||
|
sd/source/ui/slidesorter/view/SlsTheme.cxx | 9 +++++----
|
||||||
|
4 files changed, 15 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
|
||||||
|
index ec698d0..7d417da 100644
|
||||||
|
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
|
||||||
|
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
|
||||||
|
@@ -85,6 +85,7 @@ private:
|
||||||
|
Bitmap maFocusedBackground;
|
||||||
|
Bitmap maMouseOverBackground;
|
||||||
|
Bitmap maMouseOverFocusedBackground;
|
||||||
|
+ Bitmap maMouseOverSelectedBackground;
|
||||||
|
Bitmap maMouseOverSelectedAndFocusedBackground;
|
||||||
|
Size maSize;
|
||||||
|
|
||||||
|
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
|
||||||
|
index 5a69142..55188af 100644
|
||||||
|
--- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
|
||||||
|
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
|
||||||
|
@@ -82,6 +82,7 @@ public:
|
||||||
|
Gradient_SelectedPage,
|
||||||
|
Gradient_SelectedAndFocusedPage,
|
||||||
|
Gradient_MouseOverPage,
|
||||||
|
+ Gradient_MouseOverSelected,
|
||||||
|
Gradient_MouseOverSelectedAndFocusedPage,
|
||||||
|
Gradient_FocusedPage,
|
||||||
|
_GradientColorType_Size_
|
||||||
|
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
|
||||||
|
index 60c51fa..736c6dc 100644
|
||||||
|
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
|
||||||
|
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
|
||||||
|
@@ -53,13 +53,7 @@ PageObjectPainter::PageObjectPainter (
|
||||||
|
mpTheme(rSlideSorter.GetTheme()),
|
||||||
|
mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rSlideSorter.GetContentWindow())),
|
||||||
|
mpShadowPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_RawShadow))),
|
||||||
|
- mpFocusBorderPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_FocusBorder))),
|
||||||
|
- maNormalBackground(),
|
||||||
|
- maSelectionBackground(),
|
||||||
|
- maFocusedSelectionBackground(),
|
||||||
|
- maMouseOverBackground(),
|
||||||
|
- maMouseOverFocusedBackground(),
|
||||||
|
- maSize()
|
||||||
|
+ mpFocusBorderPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_FocusBorder)))
|
||||||
|
{
|
||||||
|
// Replace the color (not the alpha values) in the focus border with a
|
||||||
|
// color derived from the current selection color.
|
||||||
|
@@ -148,6 +142,7 @@ void PageObjectPainter::InvalidateBitmaps (void)
|
||||||
|
maFocusedSelectionBackground.SetEmpty();
|
||||||
|
maFocusedBackground.SetEmpty();
|
||||||
|
maMouseOverBackground.SetEmpty();
|
||||||
|
+ maMouseOverSelectedBackground.SetEmpty();
|
||||||
|
maMouseOverFocusedBackground.SetEmpty();
|
||||||
|
maMouseOverSelectedAndFocusedBackground.SetEmpty();
|
||||||
|
}
|
||||||
|
@@ -399,6 +394,12 @@ Bitmap& PageObjectPainter::GetBackgroundForState (
|
||||||
|
true);
|
||||||
|
|
||||||
|
case MouseOver | Selected:
|
||||||
|
+ return GetBackground(
|
||||||
|
+ maMouseOverSelectedBackground,
|
||||||
|
+ Theme::Gradient_MouseOverSelected,
|
||||||
|
+ rReferenceDevice,
|
||||||
|
+ false);
|
||||||
|
+
|
||||||
|
case MouseOver:
|
||||||
|
return GetBackground(
|
||||||
|
maMouseOverBackground,
|
||||||
|
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
|
||||||
|
index c38951c..3ac38cc 100644
|
||||||
|
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
|
||||||
|
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
|
||||||
|
@@ -110,11 +110,12 @@ void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpPropert
|
||||||
|
maColor[Color_PageCountFontColor] = White;
|
||||||
|
|
||||||
|
// Set up gradients.
|
||||||
|
- SetGradient(Gradient_SelectedPage, aSelectionColor, 50, 50, +100,+100, +50,+25);
|
||||||
|
- SetGradient(Gradient_MouseOverPage, aSelectionColor, 75, 75, +100,+100, +50,+25);
|
||||||
|
- SetGradient(Gradient_SelectedAndFocusedPage, aSelectionColor, 50, 50, +100,+100, -50,-75);
|
||||||
|
- SetGradient(Gradient_MouseOverSelectedAndFocusedPage, aSelectionColor, 75, 75, +100,+100, -50,-75);
|
||||||
|
+ SetGradient(Gradient_MouseOverPage, aSelectionColor, 0, 60, +80,+100, +50,+25);
|
||||||
|
+ SetGradient(Gradient_SelectedPage, aSelectionColor, 50, 50, +80,+100, +50,+25);
|
||||||
|
SetGradient(Gradient_FocusedPage, aSelectionColor, -1,-1, 0,0, -50,-75);
|
||||||
|
+ SetGradient(Gradient_MouseOverSelected, aSelectionColor, 55, 60, +80,+100, +50,+25);
|
||||||
|
+ SetGradient(Gradient_SelectedAndFocusedPage, aSelectionColor, 50, 50, +80,+100, -50,-75);
|
||||||
|
+ SetGradient(Gradient_MouseOverSelectedAndFocusedPage, aSelectionColor, 55, 60, +80,+100, -50,-75);
|
||||||
|
|
||||||
|
SetGradient(Gradient_NormalPage, maBackgroundColor, -1,-1, 0,0, 0,0);
|
||||||
|
|
||||||
|
--
|
||||||
|
1.9.0
|
||||||
|
|
Loading…
Reference in new issue