boxpointer: Cope with a missing -arrow-border-color when we have no border
https://bugzilla.gnome.org/show_bug.cgi?id=680426
This commit is contained in:
parent
e875b9cdca
commit
e7e56e175a
@ -252,7 +252,6 @@ const BoxPointer = new Lang.Class({
|
|||||||
let halfBorder = borderWidth / 2;
|
let halfBorder = borderWidth / 2;
|
||||||
let halfBase = Math.floor(base/2);
|
let halfBase = Math.floor(base/2);
|
||||||
|
|
||||||
let borderColor = themeNode.get_color('-arrow-border-color');
|
|
||||||
let backgroundColor = themeNode.get_color('-arrow-background-color');
|
let backgroundColor = themeNode.get_color('-arrow-background-color');
|
||||||
|
|
||||||
let [width, height] = area.get_surface_size();
|
let [width, height] = area.get_surface_size();
|
||||||
@ -263,7 +262,6 @@ const BoxPointer = new Lang.Class({
|
|||||||
boxWidth -= rise;
|
boxWidth -= rise;
|
||||||
}
|
}
|
||||||
let cr = area.get_context();
|
let cr = area.get_context();
|
||||||
Clutter.cairo_set_source_color(cr, borderColor);
|
|
||||||
|
|
||||||
// Translate so that box goes from 0,0 to boxWidth,boxHeight,
|
// Translate so that box goes from 0,0 to boxWidth,boxHeight,
|
||||||
// with the arrow poking out of that
|
// with the arrow poking out of that
|
||||||
@ -359,9 +357,13 @@ const BoxPointer = new Lang.Class({
|
|||||||
|
|
||||||
Clutter.cairo_set_source_color(cr, backgroundColor);
|
Clutter.cairo_set_source_color(cr, backgroundColor);
|
||||||
cr.fillPreserve();
|
cr.fillPreserve();
|
||||||
|
|
||||||
|
if (borderWidth > 0) {
|
||||||
|
let borderColor = themeNode.get_color('-arrow-border-color');
|
||||||
Clutter.cairo_set_source_color(cr, borderColor);
|
Clutter.cairo_set_source_color(cr, borderColor);
|
||||||
cr.setLineWidth(borderWidth);
|
cr.setLineWidth(borderWidth);
|
||||||
cr.stroke();
|
cr.stroke();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setPosition: function(sourceActor, alignment) {
|
setPosition: function(sourceActor, alignment) {
|
||||||
|
Loading…
Reference in New Issue
Block a user