change middle click
middle click: toggle fill remove toggleShape method update prefs and .pot
This commit is contained in:
parent
d2c285154b
commit
ec2408043f
8
draw.js
8
draw.js
|
|
@ -165,7 +165,7 @@ var DrawingArea = new Lang.Class({
|
|||
}
|
||||
|
||||
// hide helper
|
||||
if (this.helper.visible && button != 2) {
|
||||
if (this.helper.visible) {
|
||||
this.helper.hideHelp();
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ var DrawingArea = new Lang.Class({
|
|||
this._startDrawing(x, y, shiftPressed);
|
||||
return Clutter.EVENT_STOP;
|
||||
} else if (button == 2) {
|
||||
this.toggleShape();
|
||||
this.toggleFill();
|
||||
} else if (button == 3) {
|
||||
this._stopDrawing();
|
||||
this.menu.open(x, y);
|
||||
|
|
@ -437,10 +437,6 @@ var DrawingArea = new Lang.Class({
|
|||
this.emitter.emit('show-osd', _(ShapeNames[shape]), null);
|
||||
},
|
||||
|
||||
toggleShape: function() {
|
||||
this.selectShape((this.currentShape == Object.keys(Shapes).length - 1) ? 0 : this.currentShape + 1);
|
||||
},
|
||||
|
||||
toggleFill: function() {
|
||||
this.fill = !this.fill;
|
||||
this.emitter.emit('show-osd', this.fill ? _("Fill") : _("Stroke"), null);
|
||||
|
|
|
|||
|
|
@ -206,13 +206,13 @@ msgstr ""
|
|||
msgid "Left click"
|
||||
msgstr ""
|
||||
|
||||
msgid "Draw by filling in"
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "Right click"
|
||||
msgstr ""
|
||||
|
||||
msgid "Toggle shape"
|
||||
msgid "Toggle fill/stroke"
|
||||
msgstr ""
|
||||
|
||||
msgid "Center click"
|
||||
|
|
@ -299,7 +299,7 @@ msgstr ""
|
|||
msgid "Smooth stroke during the drawing process"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can smooth the stroke afterward\nSee"
|
||||
msgid "You can also smooth the stroke afterward\nSee"
|
||||
msgstr ""
|
||||
|
||||
msgid "Change the style"
|
||||
|
|
|
|||
6
prefs.js
6
prefs.js
|
|
@ -75,8 +75,8 @@ var INTERNAL_KEYBINDINGS = {
|
|||
|
||||
var OTHER_SHORTCUTS = [
|
||||
{ desc: "Draw", shortcut: "Left click" },
|
||||
{ desc: "Draw by filling in", shortcut: "Right click" },
|
||||
{ desc: "Toggle shape", shortcut: "Center click" },
|
||||
{ desc: "Menu", shortcut: "Right click" },
|
||||
{ desc: "Toggle fill/stroke", shortcut: "Center click" },
|
||||
{ desc: "Transform shape (when drawing)", shortcut: "Ctrl key" },
|
||||
{ desc: "Increment/decrement line width", shortcut: "Scroll" },
|
||||
{ desc: "Select color", shortcut: "Ctrl+1...9" },
|
||||
|
|
@ -287,7 +287,7 @@ var PrefsPage = new GObject.Class({
|
|||
let smoothBox = new Gtk.Box({ margin: MARGIN });
|
||||
let smoothLabelBox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
|
||||
let smoothLabel1 = new Gtk.Label({label: _("Smooth stroke during the drawing process")});
|
||||
let smoothLabel2 = new Gtk.Label({ use_markup: true, halign: 1, label: "<small>" + _("You can smooth the stroke afterward\nSee") + " \"" + _("Smooth last brushstroke") + "\"</small>" });
|
||||
let smoothLabel2 = new Gtk.Label({ use_markup: true, halign: 1, label: "<small>" + _("You can also smooth the stroke afterward\nSee") + " \"" + _("Smooth last brushstroke") + "\"</small>" });
|
||||
smoothLabel1.set_halign(1);
|
||||
smoothLabel2.get_style_context().add_class("dim-label");
|
||||
smoothLabelBox.pack_start(smoothLabel1, true, true, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue