[chronojump] Encoder capturing message bigger



commit 0f6396878f53513bcee41112222218321cd09dd8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Feb 20 11:01:20 2020 +0100

    Encoder capturing message bigger

 src/gui/app1/encoder.cs        |  4 ++--
 src/gui/encoderGraphObjects.cs | 14 ++++++++++----
 2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index aa400aeb..44c43873 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -5555,7 +5555,7 @@ public partial class ChronoJumpWindow
                        //on continuous mode do not erase bars at beginning of capture in order to see last 
bars
                        if(action == encoderActions.CAPTURE && radio_encoder_capture_cont.Active) {
                                prepareEncoderGraphs(false, true); //bars, signal
-                               encoderGraphDoPlot.ShowMessage("Previous set");
+                               encoderGraphDoPlot.ShowMessage("Previous set", true, false);
                        } else
                                prepareEncoderGraphs(true, true);
 
@@ -5576,7 +5576,7 @@ public partial class ChronoJumpWindow
                                if(encoder_capture_curves_bars_pixmap != null)
                                        UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea, 
encoder_capture_curves_bars_pixmap);
 
-                               encoderGraphDoPlot.ShowMessage(Catalog.GetString("Capturing") + " ...");
+                               encoderGraphDoPlot.ShowMessage(Catalog.GetString("Capturing") + " ...", 
false, true);
 
                                encoderCaptureStringR = new List<string>();
                                encoderCaptureStringR.Add(
diff --git a/src/gui/encoderGraphObjects.cs b/src/gui/encoderGraphObjects.cs
index 01982fe2..84a2c736 100644
--- a/src/gui/encoderGraphObjects.cs
+++ b/src/gui/encoderGraphObjects.cs
@@ -858,10 +858,13 @@ public class EncoderGraphDoPlot
                UtilGtk.ErasePaint(drawingarea, pixmap);
        }
 
-       public void ShowMessage(string message) 
+       public void ShowMessage(string message, bool showLine, bool big)
        {
                Pango.Layout layout_message = new Pango.Layout (drawingarea.PangoContext);
-               layout_message.FontDescription = Pango.FontDescription.FromString ("Courier 10");
+               if(big)
+                       layout_message.FontDescription = Pango.FontDescription.FromString ("Courier 16");
+               else
+                       layout_message.FontDescription = Pango.FontDescription.FromString ("Courier 10");
                
                int graphWidth = drawingarea.Allocation.Width;
                int graphHeight = drawingarea.Allocation.Height;
@@ -874,9 +877,12 @@ public class EncoderGraphDoPlot
                int xStart = Convert.ToInt32(graphWidth/2 - textWidth/2);
                int yStart = Convert.ToInt32(graphHeight/2 - textHeight/2);
 
+               Rectangle rect;
                //draw horizontal line behind (across all graph)
-               Rectangle rect = new Rectangle(0, yStart + textHeight -1, graphWidth, 1);
-               pixmap.DrawRectangle(pen_yellow_encoder_capture, true, rect);
+               if(showLine) {
+                       rect = new Rectangle(0, yStart + textHeight -1, graphWidth, 1);
+                       pixmap.DrawRectangle(pen_yellow_encoder_capture, true, rect);
+               }
 
                //draw rectangle behind text
                rect = new Rectangle(xStart -2, yStart -2, textWidth +2, textHeight +2);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]