Port torrent rows to HdyPreferencesRow and use isolated style for expanded rows

parent ce7e6ccc
Pipeline #184350 passed with stage
in 7 minutes and 1 second
......@@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="FragmentsTorrentRow" parent="GtkListBoxRow">
<template class="FragmentsTorrentRow" parent="HdyPreferencesRow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
......
using Gtk;
[GtkTemplate (ui = "/de/haeckerfelix/Fragments/ui/torrent-row.ui")]
public class Fragments.TorrentRow : Gtk.ListBoxRow{
public class Fragments.TorrentRow : Hdy.PreferencesRow {
private unowned Torrent torrent;
......@@ -98,8 +98,14 @@ public class Fragments.TorrentRow : Gtk.ListBoxRow{
}
public void toggle_revealer (){
revealer.set_reveal_child(!revealer.get_reveal_child());
public void toggle_revealer () {
if (revealer.get_reveal_child()) {
revealer.set_reveal_child(false);
this.isolated = false;
}else{
revealer.set_reveal_child(true);
this.isolated = true;
}
}
private void remove_torrent(){
......
......@@ -28,9 +28,11 @@ c_args = [
'-DHANDY_USE_UNSTABLE_API',
]
# FIXME Disable --disable-since-check after libhandy 1.0 is released
vala_args = [
'--target-glib=2.38',
'--vapidir', vapi_dir,
'--disable-since-check',
]
executable(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment