[gnome-shell/gnome-3-8] popupMenu: Allow for an optional border for slider handle
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-8] popupMenu: Allow for an optional border for slider handle
- Date: Wed, 22 May 2013 16:47:47 +0000 (UTC)
commit 3074e48405da3f82ce3e0d4056c49e7d40241388
Author: Florian Müllner <fmuellner gnome org>
Date: Tue May 21 19:04:03 2013 +0200
popupMenu: Allow for an optional border for slider handle
While the default style works well will a solid handle, using both
border and fill color would be desirable in classic mode. Add the
necessary (optional) style properties to allow this.
https://bugzilla.gnome.org/show_bug.cgi?id=697917
js/ui/popupMenu.js | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index ab6c795..88305da 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -553,6 +553,10 @@ const PopupSliderMenuItem = new Lang.Class({
let handleRadius = themeNode.get_length('-slider-handle-radius');
+ let handleBorderWidth = themeNode.get_length('-slider-handle-border-width');
+ let [hasHandleColor, handleBorderColor] =
+ themeNode.lookup_color('-slider-handle-border-color', false);
+
let sliderWidth = width - 2 * handleRadius;
let sliderHeight = themeNode.get_length('-slider-height');
@@ -604,7 +608,16 @@ const PopupSliderMenuItem = new Lang.Class({
color.blue / 255,
color.alpha / 255);
cr.arc(handleX, handleY, handleRadius, 0, 2 * Math.PI);
- cr.fill();
+ cr.fillPreserve();
+ if (hasHandleColor && handleBorderWidth) {
+ cr.setSourceRGBA(
+ handleBorderColor.red / 255,
+ handleBorderColor.green / 255,
+ handleBorderColor.blue / 255,
+ handleBorderColor.alpha / 255);
+ cr.setLineWidth(handleBorderWidth);
+ cr.stroke();
+ }
cr.$dispose();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]