[gnome-calculator] Add padding to entry to avoid showing scrollbar over numbers (bgo#770246)



commit 8316437efbbce2f0fa8df60371f05ef6f76a9d16
Author: Robert Roth <robert roth off gmail com>
Date:   Wed Jan 24 01:33:44 2018 +0200

    Add padding to entry to avoid showing scrollbar over numbers (bgo#770246)

 src/calculator.css    |    4 ++++
 src/math-display.vala |    5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/calculator.css b/src/calculator.css
index 6c4ffc1..2b0d4a9 100644
--- a/src/calculator.css
+++ b/src/calculator.css
@@ -19,6 +19,10 @@ window > grid {
   padding: 12px;
 }
 
+.display-scrolled .sourceview {
+  padding-bottom: 8px;
+}
+
 .math-buttons button {
 }
 
diff --git a/src/math-display.vala b/src/math-display.vala
index 4a806e7..e88a89d 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -38,6 +38,9 @@ public class MathDisplay : Gtk.Viewport
         main_box.show_all ();
 
         var scrolled_window = new Gtk.ScrolledWindow (null, null);
+        var style_context = scrolled_window.get_style_context ();
+        style_context.add_class ("display-scrolled");
+
         scrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.NEVER);
         source_view = new Gtk.SourceView.with_buffer (equation);
         source_view.set_accepts_tab (false);
@@ -45,8 +48,6 @@ public class MathDisplay : Gtk.Viewport
         source_view.set_pixels_below_lines (2);
         source_view.set_justification (Gtk.Justification.LEFT);
 
-        var style_context = source_view.get_style_context ();
-
         source_view.set_name ("displayitem");
         source_view.set_size_request (20, 20);
         source_view.get_accessible ().set_role (Atk.Role.EDITBAR);


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