File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ template GeopardWindow: Adw.ApplicationWindow {
6565 }
6666 }
6767 }
68- Adw.TabBar {
68+ Adw.TabBar tab_bar {
6969 view: tab_view;
7070 }
7171 Gtk.Overlay {
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ pub mod imp {
5151 #[ template_child]
5252 pub ( crate ) tab_view : TemplateChild < adw:: TabView > ,
5353 #[ template_child]
54+ pub ( crate ) tab_bar : TemplateChild < adw:: TabBar > ,
55+ #[ template_child]
5456 pub ( crate ) primary_menu_btn : TemplateChild < gtk:: MenuButton > ,
5557 pub ( crate ) config : RefCell < config:: Config > ,
5658 pub ( crate ) progress_animation : RefCell < Option < adw:: SpringAnimation > > ,
@@ -554,8 +556,13 @@ impl Window {
554556 }
555557 fn squeezer_changed ( & self ) {
556558 let imp = self . imp ( ) ;
557- imp. bottom_bar_revealer
558- . set_reveal_child ( self . is_small_screen ( ) ) ;
559+ let is_small = self . is_small_screen ( ) ;
560+ imp. bottom_bar_revealer . set_reveal_child ( is_small) ;
561+ if is_small {
562+ imp. tab_bar . add_css_class ( "inline" ) ;
563+ } else {
564+ imp. tab_bar . remove_css_class ( "inline" ) ;
565+ }
559566 }
560567 fn present_shortcuts ( & self ) {
561568 gtk:: Builder :: from_resource ( "/com/ranfdev/Geopard/ui/shortcuts.ui" ) ;
You can’t perform that action at this time.
0 commit comments