mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-07 05:01:03 +02:00
refactor: standardise error messages
This commit is contained in:
parent
fd2d7e5c7a
commit
9d5049dde0
19 changed files with 117 additions and 110 deletions
|
@ -63,6 +63,8 @@ impl Default for BarPosition {
|
|||
}
|
||||
|
||||
impl BarPosition {
|
||||
/// Gets the orientation the bar and widgets should use
|
||||
/// based on this position.
|
||||
pub fn get_orientation(self) -> Orientation {
|
||||
if self == Self::Top || self == Self::Bottom {
|
||||
Orientation::Horizontal
|
||||
|
@ -71,6 +73,8 @@ impl BarPosition {
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets the angle that label text should be displayed at
|
||||
/// based on this position.
|
||||
pub const fn get_angle(self) -> f64 {
|
||||
match self {
|
||||
Self::Top | Self::Bottom => 0.0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue