mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
refactor: rename get_orientation
method to orientation
This commit is contained in:
parent
0cc1f79be0
commit
a55ba8c523
9 changed files with 12 additions and 14 deletions
|
@ -194,7 +194,7 @@ impl Module<gtk::Box> for CustomModule {
|
|||
context: WidgetContext<Self::SendMessage, Self::ReceiveMessage>,
|
||||
info: &ModuleInfo,
|
||||
) -> Result<ModuleParts<gtk::Box>> {
|
||||
let orientation = info.bar_position.get_orientation();
|
||||
let orientation = info.bar_position.orientation();
|
||||
let container = gtk::Box::builder().orientation(orientation).build();
|
||||
|
||||
let popup_buttons = Rc::new(RefCell::new(Vec::new()));
|
||||
|
@ -236,7 +236,7 @@ impl Module<gtk::Box> for CustomModule {
|
|||
if let Some(popup) = self.popup {
|
||||
let custom_context = CustomWidgetContext {
|
||||
tx: &tx,
|
||||
bar_orientation: info.bar_position.get_orientation(),
|
||||
bar_orientation: info.bar_position.orientation(),
|
||||
icon_theme: info.icon_theme,
|
||||
popup_buttons: Rc::new(RefCell::new(vec![])),
|
||||
};
|
||||
|
|
|
@ -113,7 +113,7 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
) -> Result<ModuleParts<gtk::Box>> {
|
||||
let icon_theme = info.icon_theme;
|
||||
|
||||
let container = gtk::Box::new(info.bar_position.get_orientation(), 5);
|
||||
let container = gtk::Box::new(info.bar_position.orientation(), 5);
|
||||
|
||||
let icon = gtk::Image::new();
|
||||
if self.show_icon {
|
||||
|
|
|
@ -225,9 +225,7 @@ impl ItemButton {
|
|||
|
||||
try_send!(
|
||||
tx,
|
||||
ModuleUpdateEvent::OpenPopupAt(
|
||||
button.geometry(bar_position.get_orientation())
|
||||
)
|
||||
ModuleUpdateEvent::OpenPopupAt(button.geometry(bar_position.orientation()))
|
||||
);
|
||||
} else {
|
||||
try_send!(tx, ModuleUpdateEvent::ClosePopup);
|
||||
|
|
|
@ -301,7 +301,7 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
) -> crate::Result<ModuleParts<gtk::Box>> {
|
||||
let icon_theme = info.icon_theme;
|
||||
|
||||
let container = gtk::Box::new(info.bar_position.get_orientation(), 0);
|
||||
let container = gtk::Box::new(info.bar_position.orientation(), 0);
|
||||
|
||||
{
|
||||
let container = container.clone();
|
||||
|
|
|
@ -188,7 +188,7 @@ impl Module<gtk::Box> for SysInfoModule {
|
|||
) -> Result<ModuleParts<gtk::Box>> {
|
||||
let re = Regex::new(r"\{([^}]+)}")?;
|
||||
|
||||
let container = gtk::Box::new(info.bar_position.get_orientation(), 10);
|
||||
let container = gtk::Box::new(info.bar_position.orientation(), 10);
|
||||
|
||||
let mut labels = Vec::new();
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ impl Module<MenuBar> for TrayModule {
|
|||
let container = MenuBar::new();
|
||||
|
||||
let direction = self.direction.unwrap_or(
|
||||
if info.bar_position.get_orientation() == gtk::Orientation::Vertical {
|
||||
if info.bar_position.orientation() == gtk::Orientation::Vertical {
|
||||
PackDirection::Ttb
|
||||
} else {
|
||||
PackDirection::Ltr
|
||||
|
|
|
@ -189,7 +189,7 @@ impl Module<gtk::Box> for WorkspacesModule {
|
|||
context: WidgetContext<Self::SendMessage, Self::ReceiveMessage>,
|
||||
info: &ModuleInfo,
|
||||
) -> Result<ModuleParts<gtk::Box>> {
|
||||
let container = gtk::Box::new(info.bar_position.get_orientation(), 0);
|
||||
let container = gtk::Box::new(info.bar_position.orientation(), 0);
|
||||
|
||||
let name_map = self.name_map.clone().unwrap_or_default();
|
||||
let favs = self.favorites.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue