Skip to content

Commit

Permalink
Shorten ChangeFlags flag names
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Dec 1, 2022
1 parent f651112 commit 01d8417
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/widget/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Button {
pub fn set_label(&mut self, label: String) -> ChangeFlags {
self.label = label;
self.layout = None;
ChangeFlags::REQUEST_LAYOUT | ChangeFlags::REQUEST_PAINT
ChangeFlags::LAYOUT | ChangeFlags::PAINT
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/widget/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ bitflags! {
#[derive(Default)]
#[must_use]
pub struct ChangeFlags: u8 {
const REQUEST_UPDATE = 1;
const REQUEST_LAYOUT = 2;
const REQUEST_PAINT = 4;
const UPDATE = 1;
const LAYOUT = 2;
const PAINT = 4;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/widget/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl TextWidget {

pub fn set_text(&mut self, text: String) -> ChangeFlags {
self.text = text;
ChangeFlags::REQUEST_LAYOUT | ChangeFlags::REQUEST_PAINT
ChangeFlags::LAYOUT | ChangeFlags::PAINT
}
}

Expand Down

0 comments on commit 01d8417

Please sign in to comment.