summaryrefslogtreecommitdiff
path: root/src/gui/panels/welcome.ui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-07-22 23:38:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-07-22 23:38:20 (GMT)
commit1596de25f349ca065422074327e208cfca7d8d3f (patch)
tree481f73f6af8388bad797525b2925ec373e642670 /src/gui/panels/welcome.ui
parent6523d49b446139a1ec1e2134a2ea980765b7c66a (diff)
Simplify the constraint-based layout for the Welcome panel.
Diffstat (limited to 'src/gui/panels/welcome.ui')
-rw-r--r--src/gui/panels/welcome.ui149
1 files changed, 50 insertions, 99 deletions
diff --git a/src/gui/panels/welcome.ui b/src/gui/panels/welcome.ui
index 422e2ad..c545b1d 100644
--- a/src/gui/panels/welcome.ui
+++ b/src/gui/panels/welcome.ui
@@ -10,112 +10,16 @@
<property name="vexpand">TRUE</property>
<property name="has-frame">0</property>
<child>
- <object class="GtkGizmo">
+ <object class="GtkGrid">
<property name="halign">center</property>
<property name="valign">center</property>
+ <property name="column-spacing">64</property>
+ <property name="column-homogeneous">TRUE</property>
<property name="margin-bottom">32</property>
<property name="margin-end">32</property>
<property name="margin-start">32</property>
<property name="margin-top">32</property>
- <!-- Layout -->
- <property name="layout-manager">
- <object class="GtkConstraintLayout">
- <constraints>
-
- <!-- Central point -->
-
- <guide name="guide-center"
- min-width="1" nat-width="1" max-width="1"
- min-height="1" nat-height="1" max-height="1"/>
-
- <constraint target="guide-center" target-attribute="left"
- source="super" source-attribute="width"
- relation="eq"
- multiplier="0.5"
- strength="required"/>
-
- <constraint target="guide-center" target-attribute="top"
- source="super" source-attribute="height"
- relation="eq"
- multiplier="0.5"
- strength="required"/>
-
- <!-- Widgets -->
-
- <constraint target="list" target-attribute="right"
- source="guide-center" source-attribute="left"
- relation="eq"
- constant="-32"
- strength="required"/>
-
- <constraint target="list" target-attribute="center-y"
- source="guide-center" source-attribute="top"
- relation="eq"
- strength="required"/>
-
- <constraint target="properties" target-attribute="left"
- source="guide-center" source-attribute="left"
- relation="eq"
- constant="32"
- strength="required"/>
-
- <constraint target="properties" target-attribute="width"
- source="list" source-attribute="width"
- relation="eq"
- strength="required"/>
-
- <constraint target="properties" target-attribute="center-y"
- source="guide-center" source-attribute="top"
- relation="eq"
- strength="required"/>
-
- <!-- Surface for viewport -->
-
- <constraint target="super" target-attribute="left"
- source="list" source-attribute="left"
- relation="le"
- strength="required"/>
-
- <constraint target="super" target-attribute="left"
- source="properties" source-attribute="left"
- relation="le"
- strength="required"/>
-
- <constraint target="super" target-attribute="right"
- source="list" source-attribute="right"
- relation="ge"
- strength="required"/>
-
- <constraint target="super" target-attribute="right"
- source="properties" source-attribute="right"
- relation="ge"
- strength="required"/>
-
- <constraint target="super" target-attribute="top"
- source="list" source-attribute="top"
- relation="le"
- strength="required"/>
-
- <constraint target="super" target-attribute="top"
- source="properties" source-attribute="top"
- relation="le"
- strength="required"/>
-
- <constraint target="super" target-attribute="bottom"
- source="list" source-attribute="bottom"
- relation="ge"
- strength="required"/>
-
- <constraint target="super" target-attribute="bottom"
- source="properties" source-attribute="bottom"
- relation="ge"
- strength="required"/>
-
- </constraints>
- </object>
- </property>
-
<!-- Launcher list -->
<child>
<object class="GtkListBox" id="list">
@@ -123,11 +27,19 @@
<property name="valign">center</property>
<property name="selection-mode">GTK_SELECTION_SINGLE</property>
<property name="activate-on-single-click">0</property>
+
+ <layout>
+ <property name="column">0</property>
+ <property name="row">0</property>
+ </layout>
+
<style>
<class name="boxed-list"/>
<class name="frame"/>
</style>
+
<signal name="selected-rows-changed" handler="gtk_welcome_panel_on_selected_rows_changed"/>
+
</object>
</child>
@@ -136,11 +48,18 @@
<object class="GtkStack" id="properties">
<property name="halign">start</property>
<property name="valign">fill</property>
+
+ <layout>
+ <property name="column">1</property>
+ <property name="row">0</property>
+ </layout>
+
<child>
<object class="GtkStackPage">
<property name="name">default</property>
<property name="title">Welcome</property>
+
<property name="child">
<object class="GtkGrid" id="def_child">
<property name="halign">start</property>
@@ -149,6 +68,7 @@
<property name="column-homogeneous">FALSE</property>
<!-- Text -->
+
<child>
<object class="GtkLabel" id="hints">
<property name="halign">start</property>
@@ -158,10 +78,37 @@
<property name="vexpand">1</property>
<property name="width-request">50</property>
<property name="wrap">TRUE</property>
+
+ <property name="layout-manager">
+ <object class="GtkConstraintLayout">
+ <!--
+ <constraints>
+
+ <constraint target="super" target-attribute="left"
+ relation="eq"
+ constant="0"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="top"
+ relation="eq"
+ constant="0"
+ strength="required"/>
+
+ <constraint target="super" target-attribute="right"
+ relation="eq"
+ constant="340"
+ strength="required"/>
+
+ </constraints>
+ -->
+ </object>
+ </property>
+
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
+
</object>
</child>
@@ -176,6 +123,7 @@
<property name="column">1</property>
<property name="row">1</property>
</layout>
+
<child>
<object class="GtkButton">
<property name="icon-name">go-previous-symbolic</property>
@@ -183,6 +131,7 @@
<signal name="clicked" handler="gtk_welcome_panel_on_prev_hint_clicked"/>
</object>
</child>
+
<child>
<object class="GtkButton">
<property name="icon-name">go-next-symbolic</property>
@@ -190,9 +139,11 @@
<signal name="clicked" handler="gtk_welcome_panel_on_next_hint_clicked"/>
</object>
</child>
+
<style>
<class name="linked"/>
</style>
+
</object>
</child>