[gnome-calculator] style: Drop padding around the display
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] style: Drop padding around the display
- Date: Sun, 19 Jan 2020 20:32:14 +0000 (UTC)
commit 0f62ed65d804bad3b5782515c10bacd83cb86f34
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Jan 10 15:19:15 2020 +0100
style: Drop padding around the display
This maximizes the available space and better visualy split the display
from the buttons. It modernizes the style a bit.
src/calculator.css | 27 +++++++++++++++++++++++++--
src/math-converter.vala | 4 ++++
2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/src/calculator.css b/src/calculator.css
index a97b1e8c..3291cae5 100644
--- a/src/calculator.css
+++ b/src/calculator.css
@@ -15,10 +15,33 @@
padding: 0px 12px;
}
-window > grid {
- padding: 12px;
+window > grid > .frame {
+ border-left-width: 0;
+ border-right-width: 0;
}
+/* It isn't first in keyboard mode */
+window > grid > .frame:first-child {
+ border-top-width: 0;
+}
+
+/* It is last in keyboard mode */
+window > grid > .frame:last-child {
+ border-bottom-width: 0;
+}
+
+window > grid > box {
+ padding-left: 12px;
+ padding-right: 12px;
+ padding-bottom: 12px;
+}
+
+/* This affects the keyboard mode */
+window > grid > mathconverter {
+ padding-left: 12px;
+ padding-right: 12px;
+ padding-top: 12px;
+}
.math-buttons button {
}
diff --git a/src/math-converter.vala b/src/math-converter.vala
index ee335891..802a069a 100644
--- a/src/math-converter.vala
+++ b/src/math-converter.vala
@@ -29,6 +29,10 @@ public class MathConverter : Gtk.Grid
public signal void changed ();
+ static construct {
+ set_css_name ("mathconverter");
+ }
+
construct
{
from_combo.set_cell_data_func (from_renderer, from_cell_data_func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]