Make dropdown arrows consistent size

Since the agregate menu does 120% of font-size, make this
for all dropdown arrows in gnome-shell and rename the css
class to make clear that it is used in overall gnome-shell

https://bugzilla.gnome.org/show_bug.cgi?id=709564
This commit is contained in:
Carlos Soriano
2013-10-07 16:01:07 +02:00
parent a6ee9806de
commit 63593e45a6
5 changed files with 32 additions and 15 deletions

View File

@ -42,6 +42,32 @@ function isPopupMenuItemVisible(child) {
return child.visible;
}
/**
* @side Side to which the arrow points.
*/
function unicodeArrow(side) {
let arrowChar;
switch (side) {
case St.Side.TOP:
arrowChar = '\u25B4';
break;
case St.Side.RIGHT:
arrowChar = '\u25B8';
break;
case St.Side.BOTTOM:
arrowChar = '\u25BE';
break;
case St.Side.LEFT:
arrowChar = '\u25C2';
break;
}
return new St.Label({ text: arrowChar,
style_class: 'unicode-arrow',
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
}
const PopupBaseMenuItem = new Lang.Class({
Name: 'PopupBaseMenuItem',
@ -962,8 +988,7 @@ const PopupSubMenuMenuItem = new Lang.Class({
y_align: Clutter.ActorAlign.CENTER });
this.actor.add_child(this.status);
this._triangle = new St.Label({ text: '\u25B8',
style_class: 'popup-submenu-menu-item-triangle' });
this._triangle = unicodeArrow(St.Side.RIGHT);
this._triangle.pivot_point = new Clutter.Point({ x: 0.5, y: 0.6 });
this._triangleBin = new St.Widget({ y_expand: true,