Change color and tool icons
This commit is contained in:
parent
e341b36d65
commit
8fae815ed8
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="1280.000000pt" height="1280.000000pt" viewBox="0 0 1280.000000 1280.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.15, written by Peter Selinger 2001-2017
|
||||
https://svgsilh.com/image/1745699.html
|
||||
https://creativecommons.org/publicdomain/zero/1.0
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
|
||||
fill="#474747" stroke="none">
|
||||
<path d="M6327 11528 c-810 -978 -1626 -2136 -2199 -3118 -727 -1246 -1162
|
||||
-2345 -1273 -3221 -65 -519 -30 -906 132 -1429 123 -399 306 -782 548 -1145
|
||||
160 -240 301 -412 509 -621 311 -311 572 -504 926 -683 381 -194 749 -301
|
||||
1200 -352 139 -16 536 -16 680 0 842 92 1553 444 2160 1068 559 574 966 1348
|
||||
1130 2147 69 335 69 750 0 1175 -232 1428 -1308 3444 -3004 5626 -240 310
|
||||
-614 765 -627 765 -3 0 -86 -96 -182 -212z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
6
draw.js
6
draw.js
|
|
@ -55,6 +55,7 @@ const TEXT_CURSOR_TIME = 600; // ms
|
|||
const ENABLE_RTL = false;
|
||||
|
||||
const ICON_DIR = Me.dir.get_child('data').get_child('icons');
|
||||
const COLOR_ICON_PATH = ICON_DIR.get_child('color-symbolic.svg').get_path();
|
||||
const FILL_ICON_PATH = ICON_DIR.get_child('fill-symbolic.svg').get_path();
|
||||
const STROKE_ICON_PATH = ICON_DIR.get_child('stroke-symbolic.svg').get_path();
|
||||
const LINEJOIN_ICON_PATH = ICON_DIR.get_child('linejoin-symbolic.svg').get_path();
|
||||
|
|
@ -2066,6 +2067,7 @@ const DrawingMenu = new Lang.Class({
|
|||
menuCloseFunc.bind(this.menu)(animate);
|
||||
};
|
||||
|
||||
this.colorIcon = new Gio.FileIcon({ file: Gio.File.new_for_path(COLOR_ICON_PATH) });
|
||||
this.strokeIcon = new Gio.FileIcon({ file: Gio.File.new_for_path(STROKE_ICON_PATH) });
|
||||
this.fillIcon = new Gio.FileIcon({ file: Gio.File.new_for_path(FILL_ICON_PATH) });
|
||||
this.fillRuleNonzeroIcon = new Gio.FileIcon({ file: Gio.File.new_for_path(FILLRULE_NONZERO_ICON_PATH) });
|
||||
|
|
@ -2129,7 +2131,7 @@ const DrawingMenu = new Lang.Class({
|
|||
this.menu.addAction(_("Smooth"), this.area.smoothLastElement.bind(this.area), 'format-text-strikethrough-symbolic');
|
||||
this._addSeparator(this.menu);
|
||||
|
||||
this._addSubMenuItem(this.menu, null, ToolNames, this.area, 'currentTool', this._updateSectionVisibility.bind(this));
|
||||
this._addSubMenuItem(this.menu, 'document-edit-symbolic', ToolNames, this.area, 'currentTool', this._updateSectionVisibility.bind(this));
|
||||
this._addColorSubMenuItem(this.menu);
|
||||
this.fillItem = this._addSwitchItem(this.menu, _("Fill"), this.strokeIcon, this.fillIcon, this.area, 'fill', this._updateSectionVisibility.bind(this));
|
||||
this.fillSection = new PopupMenu.PopupMenuSection();
|
||||
|
|
@ -2302,7 +2304,7 @@ const DrawingMenu = new Lang.Class({
|
|||
|
||||
_addColorSubMenuItem: function(menu) {
|
||||
let item = new PopupMenu.PopupSubMenuMenuItem(_("Color"), true);
|
||||
item.icon.set_icon_name('document-edit-symbolic');
|
||||
item.icon.set_gicon(this.colorIcon);
|
||||
item.icon.set_style(`color:${this.area.currentColor.to_string().slice(0, 7)};`);
|
||||
|
||||
item.menu.itemActivated = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue