add id to headerbar and carosuel_dots

main
Muqtxdir 2 years ago
parent f7e55361e4
commit a93b220743

@ -10,12 +10,12 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="AdwHeaderBar"> <object class="AdwHeaderBar" id="headerbar">
<style> <style>
<class name="flat" /> <class name="flat" />
</style> </style>
<property name="title_widget"> <property name="title_widget">
<object class="AdwCarouselIndicatorDots"> <object class="AdwCarouselIndicatorDots" id="carousel_indicator_dots">
<property name="carousel">carousel</property> <property name="carousel">carousel</property>
<property name="orientation">horizontal</property> <property name="orientation">horizontal</property>
</object> </object>

@ -31,6 +31,8 @@ class VanillaWindow(Adw.ApplicationWindow):
__gtype_name__ = 'VanillaWindow' __gtype_name__ = 'VanillaWindow'
carousel = Gtk.Template.Child() carousel = Gtk.Template.Child()
carousel_indicator_dots = Gtk.Template.Child()
headerbar = Gtk.Template.Child()
btn_back = Gtk.Template.Child() btn_back = Gtk.Template.Child()
toasts = Gtk.Template.Child() toasts = Gtk.Template.Child()
@ -85,9 +87,13 @@ class VanillaWindow(Adw.ApplicationWindow):
if page not in [self.__view_progress, self.__view_done]: if page not in [self.__view_progress, self.__view_done]:
self.btn_back.set_visible(cur_index != 0.0) self.btn_back.set_visible(cur_index != 0.0)
self.carousel_indicator_dots.set_visible(cur_index != 0.0)
self.headerbar.set_show_end_title_buttons(cur_index != 0.0)
return return
self.btn_back.set_visible(False) self.btn_back.set_visible(False)
self.carousel_indicator_dots.set_visible(False)
self.headerbar.set_show_end_title_buttons(False)
# keep the btn_back button locked if this is the last page # keep the btn_back button locked if this is the last page
if page == self.__view_done: if page == self.__view_done:

Loading…
Cancel
Save