[gnome-sudoku] Display numbers at top-left in the earmark picker
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku] Display numbers at top-left in the earmark picker
- Date: Wed, 10 Jul 2019 22:14:41 +0000 (UTC)
commit 28f377604870188490df04fad0b844fa9d557373
Author: shak-mar <shakmar openmailbox org>
Date: Wed Jul 10 21:37:21 2019 +0200
Display numbers at top-left in the earmark picker
Before this commit, the value and earmark picker looked completely the
same. However, depending on which mouse button you used, you are in a
different mode, because clicking the numbers has a different effect.
It's always a good thing to make state like that visible to the user, so
now we give a slight hint by displaying the number off-center in earmark
mode.
src/number-picker.vala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/number-picker.vala b/src/number-picker.vala
index 22e3032..481c0c9 100644
--- a/src/number-picker.vala
+++ b/src/number-picker.vala
@@ -50,9 +50,10 @@ private class NumberPicker : Gtk.Grid
var label = new Label ("<big>%d</big>".printf (n));
label.use_markup = true;
- label.margin = 4;
- label.margin_start = 8;
- label.margin_end = 8;
+ label.margin_start = earmark ? 0 : 8;
+ label.margin_end = earmark ? 16 : 8;
+ label.margin_top = earmark ? 0 : 4;
+ label.margin_bottom = earmark ? 8 : 4;
button.add (label);
label.show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]