[gnome-taquin/arnaudb/wip/gtk4: 91/108] Adapt OverlayedList.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin/arnaudb/wip/gtk4: 91/108] Adapt OverlayedList.
- Date: Tue, 29 Sep 2020 14:16:04 +0000 (UTC)
commit 646c4f5c3106d9ee5299f5e13c1f290e17b92c7c
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Feb 19 20:44:01 2020 +0100
Adapt OverlayedList.
data/ui/overlayed-list.ui | 15 +++------------
src/overlayed-list.vala | 8 ++++----
2 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/data/ui/overlayed-list.ui b/data/ui/overlayed-list.ui
index 61f7d80..5dd7cdb 100644
--- a/data/ui/overlayed-list.ui
+++ b/data/ui/overlayed-list.ui
@@ -16,17 +16,15 @@
along with GNOME Taquin. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.99"/>
<template class="OverlayedList" parent="GtkOverlay">
<property name="expand">True</property>
- <property name="valign">fill</property>
<style>
<class name="overlayed-list"/>
<class name="vertical"/>
</style>
<child>
<object class="GtkScrolledWindow" id="scrolled">
- <property name="visible">True</property>
<property name="expand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="max-content-height">300</property>
@@ -34,7 +32,6 @@
<property name="propagate-natural-height">True</property>
<child>
<object class="GtkListBox" id="main_list_box">
- <property name="visible">True</property>
<signal name="selected-rows-changed" handler="on_selection_changed"/>
</object>
</child>
@@ -51,11 +48,8 @@
<class name="linked-circular"/>
</style>
<child>
- <object class="GtkModelButton" id="leave_edit_mode_button">
- <property name="visible">True</property>
+ <object class="GtkToggleButton" id="leave_edit_mode_button">
<property name="hexpand">True</property>
- <property name="centered">True</property>
- <property name="iconic">True</property>
<property name="focus-on-click">False</property>
<style>
<class name="left-on-ltr"/>
@@ -63,11 +57,8 @@
</object>
</child>
<child>
- <object class="GtkModelButton" id="enter_edit_mode_button">
- <property name="visible">True</property>
+ <object class="GtkToggleButton" id="enter_edit_mode_button">
<property name="hexpand">True</property>
- <property name="centered">True</property>
- <property name="iconic">True</property>
<property name="focus-on-click">False</property>
<style>
<class name="right-on-ltr"/>
diff --git a/src/overlayed-list.vala b/src/overlayed-list.vala
index 3fbb1c3..ad834c5 100644
--- a/src/overlayed-list.vala
+++ b/src/overlayed-list.vala
@@ -45,8 +45,8 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
}
- [GtkChild] private ModelButton enter_edit_mode_button;
- [GtkChild] private ModelButton leave_edit_mode_button;
+ [GtkChild] private ToggleButton enter_edit_mode_button;
+ [GtkChild] private ToggleButton leave_edit_mode_button;
[CCode (notify = false)] public string edit_mode_action_prefix
{
construct
@@ -58,8 +58,8 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
leave_edit_mode_button.set_detailed_action_name (value + ".set-edit-mode(false)");
}
}
- [CCode (notify = false)] public string first_mode_name { protected set { leave_edit_mode_button.text =
value; }}
- [CCode (notify = false)] public string second_mode_name { protected set { enter_edit_mode_button.text =
value; }}
+ [CCode (notify = false)] public string first_mode_name { protected set { leave_edit_mode_button.label
= value; }}
+ [CCode (notify = false)] public string second_mode_name { protected set { enter_edit_mode_button.label
= value; }}
[CCode (notify = false)] public bool needs_shadows
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]