[gnome-text-editor] css: improve transitions for no-match in language-dialog



commit 95037cb7688e46c973265b5bdc918dc4fbe596fd
Author: Christian Hergert <chergert redhat com>
Date:   Tue Dec 7 14:00:27 2021 -0800

    css: improve transitions for no-match in language-dialog

 src/TextEditor.css            | 12 ++++++++++++
 src/editor-language-dialog.ui |  9 +++++----
 2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/src/TextEditor.css b/src/TextEditor.css
index 6ca8f4f..7210c29 100644
--- a/src/TextEditor.css
+++ b/src/TextEditor.css
@@ -142,3 +142,15 @@ box.statusbar {
   background: @theme_bg_color;
   border-top: 1px solid @borders;
 }
+
+
+window.org-gnome-TextEditor.language-dialog row:last-child {
+  border-bottom: 1px solid transparent;
+}
+window.org-gnome-TextEditor.language-dialog label.placeholder {
+  min-height: 55px; /* 50px min-height + 2 padding top/bottom + 1 border */
+  margin-left: 12px;
+  margin-right: 12px;
+  padding-left: 2px;
+  padding-right: 2px;
+}
diff --git a/src/editor-language-dialog.ui b/src/editor-language-dialog.ui
index e0d84ef..0a7856c 100644
--- a/src/editor-language-dialog.ui
+++ b/src/editor-language-dialog.ui
@@ -3,6 +3,10 @@
   <requires lib="gtk+" version="4.0"/>
   <template class="EditorLanguageDialog" parent="GtkWindow">
     <property name="title" translatable="yes">Document Type</property>
+    <style>
+      <class name="org-gnome-TextEditor"/>
+      <class name="language-dialog"/>
+    </style>
     <child type="titlebar">
       <object class="GtkHeaderBar"/>
     </child>
@@ -45,13 +49,10 @@
                     <child type="placeholder">
                       <object class="GtkLabel" id="placeholder">
                         <property name="label" translatable="yes">No Matches</property>
-                        <property name="margin-top">18</property>
-                        <property name="margin-bottom">18</property>
-                        <property name="margin-end">18</property>
-                        <property name="margin-start">18</property>
                         <property name="visible">false</property>
                         <style>
                           <class name="dim-label"/>
+                          <class name="placeholder"/>
                         </style>
                       </object>
                     </child>


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