[gnome-shell/wip/message-tray: 6/22] boxpointer: Cope with a missing -arrow-border-color when we have no border
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 6/22] boxpointer: Cope with a missing -arrow-border-color when we have no border
- Date: Fri, 3 Aug 2012 15:31:39 +0000 (UTC)
commit 99f562ecc3cc11f73fc0240399282ee81362637b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Jul 22 23:02:31 2012 -0300
boxpointer: Cope with a missing -arrow-border-color when we have no border
https://bugzilla.gnome.org/show_bug.cgi?id=680426
js/ui/boxpointer.js | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js
index c83c31e..03d114b 100644
--- a/js/ui/boxpointer.js
+++ b/js/ui/boxpointer.js
@@ -252,7 +252,6 @@ const BoxPointer = new Lang.Class({
let halfBorder = borderWidth / 2;
let halfBase = Math.floor(base/2);
- let borderColor = themeNode.get_color('-arrow-border-color');
let backgroundColor = themeNode.get_color('-arrow-background-color');
let [width, height] = area.get_surface_size();
@@ -263,7 +262,6 @@ const BoxPointer = new Lang.Class({
boxWidth -= rise;
}
let cr = area.get_context();
- Clutter.cairo_set_source_color(cr, borderColor);
// Translate so that box goes from 0,0 to boxWidth,boxHeight,
// with the arrow poking out of that
@@ -359,9 +357,13 @@ const BoxPointer = new Lang.Class({
Clutter.cairo_set_source_color(cr, backgroundColor);
cr.fillPreserve();
- Clutter.cairo_set_source_color(cr, borderColor);
- cr.setLineWidth(borderWidth);
- cr.stroke();
+
+ if (borderWidth > 0) {
+ let borderColor = themeNode.get_color('-arrow-border-color');
+ Clutter.cairo_set_source_color(cr, borderColor);
+ cr.setLineWidth(borderWidth);
+ cr.stroke();
+ }
},
setPosition: function(sourceActor, alignment) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]