[gnome-calculator] Replace deprecated gtk_override_font with css



commit 241bd262d84c9d0117393adcff198c4fb965f34b
Author: Robert Roth <robert roth off gmail com>
Date:   Thu Jul 27 19:43:08 2017 +0300

    Replace deprecated gtk_override_font with css

 src/calculator.css    |    8 +++++++-
 src/math-display.vala |    7 -------
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/calculator.css b/src/calculator.css
index 97e241e..6c4ffc1 100644
--- a/src/calculator.css
+++ b/src/calculator.css
@@ -47,10 +47,16 @@ window > grid {
   background-color: shade(@theme_unfocused_base_color, .97);
 }
 
+.sourceview {
+  padding-left: 12px;
+  margin-left: 10px;
+  font-size: 1.4em;
+}
+
 .history-entry {
   border-top: 1px groove @borders;
   padding: 6px 3px;
-  font-size: 20px;
+  font-size: 1.3em;
 }
 
   .history-entry .equation-label {
diff --git a/src/math-display.vala b/src/math-display.vala
index 8ba2283..1b8dfb6 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -46,13 +46,6 @@ public class MathDisplay : Gtk.Viewport
         source_view.set_justification (Gtk.Justification.LEFT);
 
         var style_context = source_view.get_style_context ();
-        style_context.save ();
-        style_context.set_state (Gtk.StateFlags.NORMAL);
-        var font_desc = style_context.get_font (Gtk.StateFlags.NORMAL);
-        style_context.restore ();
-
-        font_desc.set_size (15 * Pango.SCALE);
-        source_view.override_font (font_desc);
 
         source_view.set_name ("displayitem");
         source_view.set_size_request (20, 20);


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