[gtk/wip/baedert/for-master: 175/179] inspector: Fix huge listbox rows
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 175/179] inspector: Fix huge listbox rows
- Date: Thu, 10 Sep 2020 03:36:37 +0000 (UTC)
commit 5f3285db2590880b678067300b39e6870a557973
Author: Timm Bäder <mail baedert org>
Date: Wed Sep 2 06:28:03 2020 +0200
inspector: Fix huge listbox rows
This is handled by .rich-list
gtk/inspector/general.c | 15 ++-------
gtk/inspector/general.ui | 80 ------------------------------------------------
gtk/inspector/visual.ui | 76 ---------------------------------------------
3 files changed, 3 insertions(+), 168 deletions(-)
---
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index ab368e2f8d..87c91504dc 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -171,12 +171,7 @@ add_check_row (GtkInspectorGeneral *gen,
GtkWidget *row, *box, *label, *check;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
- g_object_set (box,
- "margin-start", 10 + indent,
- "margin-end", 10,
- "margin-top", 10,
- "margin-bottom", 10,
- NULL);
+ g_object_set (box, "margin-start", indent, NULL);
label = gtk_label_new (name);
gtk_widget_set_halign (label, GTK_ALIGN_START);
@@ -213,12 +208,7 @@ add_label_row (GtkInspectorGeneral *gen,
GtkWidget *row;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
- g_object_set (box,
- "margin-start", 10 + indent,
- "margin-end", 10,
- "margin-top", 10,
- "margin-bottom", 10,
- NULL);
+ g_object_set (box, "margin-start", indent, NULL);
label = gtk_label_new (name);
gtk_widget_set_halign (label, GTK_ALIGN_START);
@@ -572,6 +562,7 @@ populate_monitor (gpointer item,
const char *model;
list = GTK_LIST_BOX (gtk_list_box_new ());
+ gtk_widget_add_css_class (GTK_WIDGET (list), "rich-list");
gtk_list_box_set_selection_mode (list, GTK_SELECTION_NONE);
/* XXX: add monitor # here when porting to listview */
diff --git a/gtk/inspector/general.ui b/gtk/inspector/general.ui
index d2b6f00f75..86cda44b82 100644
--- a/gtk/inspector/general.ui
+++ b/gtk/inspector/general.ui
@@ -26,10 +26,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_version_label">
@@ -56,10 +52,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gdk_backend_label">
@@ -86,10 +78,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gsk_renderer_label">
@@ -116,10 +104,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="pango_fontmap_label">
@@ -146,10 +130,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="media_backend_label">
@@ -189,10 +169,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="prefix_label">
@@ -220,10 +196,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="xdg_data_home_label">
@@ -251,10 +223,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="xdg_data_dirs_label">
@@ -282,10 +250,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_path_label">
@@ -313,10 +277,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_exe_prefix_label">
@@ -344,10 +304,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gtk_data_prefix_label">
@@ -375,10 +331,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gsettings_schema_dir_label">
@@ -419,10 +371,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_label">
@@ -450,10 +398,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_rgba_label">
@@ -480,10 +424,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="display_composited_label">
@@ -536,10 +476,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gl_version_label">
@@ -567,10 +503,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="gl_vendor_label">
@@ -611,10 +543,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_device_label">
@@ -642,10 +570,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_api_version_label">
@@ -673,10 +597,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="vk_driver_version_label">
diff --git a/gtk/inspector/visual.ui b/gtk/inspector/visual.ui
index 3a04547536..7400edc46f 100644
--- a/gtk/inspector/visual.ui
+++ b/gtk/inspector/visual.ui
@@ -53,10 +53,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="theme_label">
@@ -81,10 +77,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="dark_label">
@@ -110,10 +102,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="cursor_label">
@@ -139,10 +127,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="cursor_size_label">
@@ -172,10 +156,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="icon_label">
@@ -201,10 +181,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="font_label">
@@ -230,10 +206,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="font_scale_label">
@@ -271,10 +243,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="direction_label">
@@ -309,10 +277,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="hidpi_label">
@@ -339,10 +303,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="animation_label">
@@ -368,10 +328,6 @@
<property name="activatable">0</property>
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="slowdown_label">
@@ -422,10 +378,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="fps_label">
@@ -451,10 +403,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="updates_label">
@@ -480,10 +428,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="fallback_label">
@@ -509,10 +453,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="baselines_label">
@@ -538,10 +478,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="layout_label">
@@ -567,10 +503,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="focus_label">
@@ -610,10 +542,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="touchscreen_label">
@@ -638,10 +566,6 @@
<object class="GtkListBoxRow">
<child>
<object class="GtkBox">
- <property name="margin-start">10</property>
- <property name="margin-end">10</property>
- <property name="margin-top">10</property>
- <property name="margin-bottom">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel" id="software_gl_label">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]