[chronojump/FS-TFT-Menu] Better left/right margins for CairoBarsEncoder
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/FS-TFT-Menu] Better left/right margins for CairoBarsEncoder
- Date: Wed, 20 Apr 2022 11:59:21 +0000 (UTC)
commit f585bd93059611e353ecf47193992a38d6fced6c
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 31 11:16:24 2022 +0200
Better left/right margins for CairoBarsEncoder
src/gui/cairo/bars.cs | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index 405b413c8..75f6bdb36 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -342,10 +342,7 @@ public abstract class CairoBars : CairoGeneric
yellow = colorFromRGB(255,204,1);
//margins
- leftMargin = 26;
- rightMargin = 42; //images are 24 px, separate 6 px from grapharea, and 12 px from
absoluteright
- if(usePersonGuides && useGroupGuides)
- rightMargin = 70;
+ leftRightMarginsSet();
bottomMargin = 9;
topMarginSet ();
@@ -354,6 +351,23 @@ public abstract class CairoBars : CairoGeneric
saved_l = new List<int>();
}
+ private void leftRightMarginsSet ()
+ {
+ if(type == Type.ENCODER)
+ {
+ //to just show the mice icon
+ leftMargin = 18;
+ rightMargin = 18;
+ }
+ else {
+ leftMargin = 26;
+ rightMargin = 42; //images are 24 px, separate 6 px from grapharea, and 12 px from
absoluteright
+ }
+
+ if(usePersonGuides && useGroupGuides)
+ rightMargin = 70;
+ }
+
protected abstract void topMarginSet ();
protected abstract void findMaximums(); //includes point and guides
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]