-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sonnyp:main' into Workbench-Switch
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use crate::workbench; | ||
use gtk::prelude::*; | ||
|
||
pub fn main() { | ||
let action_bar: gtk::ActionBar = workbench::builder().object("action_bar").unwrap(); | ||
let button: gtk::ToggleButton = workbench::builder().object("button").unwrap(); | ||
let start_widget: gtk::Button = workbench::builder().object("start_widget").unwrap(); | ||
let end_widget: gtk::Button = workbench::builder().object("end_widget").unwrap(); | ||
|
||
button.connect_notify_local(Some("active"), move |button, _| { | ||
action_bar.set_revealed(!button.is_active()); | ||
}); | ||
|
||
start_widget.connect_clicked(|_| { | ||
println!("Start Widget"); | ||
}); | ||
|
||
end_widget.connect_clicked(|_| { | ||
println!("End Widget"); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use crate::workbench; | ||
use gtk::prelude::*; | ||
use gtk::{MenuButton, Switch}; | ||
|
||
pub fn main() { | ||
let circular_switch: Switch = workbench::builder().object("circular_switch").unwrap(); | ||
let secondary_button: MenuButton = workbench::builder().object("secondary").unwrap(); | ||
|
||
circular_switch.connect_active_notify(move |switch| { | ||
if switch.is_active() { | ||
secondary_button.add_css_class("circular"); | ||
} else { | ||
secondary_button.remove_css_class("circular"); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use crate::workbench; | ||
use adw::prelude::*; | ||
use glib::clone; | ||
use gtk::glib; | ||
|
||
pub fn main() { | ||
let overlay_split_view: adw::OverlaySplitView = | ||
workbench::builder().object("split_view").unwrap(); | ||
|
||
let start_toggle: gtk::ToggleButton = workbench::builder().object("start_toggle").unwrap(); | ||
let end_toggle: gtk::ToggleButton = workbench::builder().object("end_toggle").unwrap(); | ||
|
||
start_toggle.connect_toggled(clone!(@weak overlay_split_view => move |_| { | ||
overlay_split_view.set_sidebar_position(gtk::PackType::Start); | ||
})); | ||
|
||
end_toggle.connect_toggled(move |_| { | ||
overlay_split_view.set_sidebar_position(gtk::PackType::End); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,8 @@ ${getBlueprintVersion()} | |
"Rasmus Thomsen <[email protected]>", | ||
"Marvin W https://github.com/mar-v-in", | ||
"Saad Khan https://github.com/saadulkh", | ||
"Adeel Ahmed Qureshi https://github.com/itsAdee", | ||
"Muhammad Bilal https://github.com/mbilal234", | ||
// Add yourself as | ||
// "John Doe", | ||
// or | ||
|