Skip to content

Commit

Permalink
add tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
gabm committed Nov 9, 2023
1 parent f86ccd6 commit 81d385b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ui/toolbars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ impl Component for StyleToolbar {

create_icon(Color::orange()),

set_tooltip: "Orange",
ActionablePlus::set_action::<ColorAction>: ColorButtons::Orange,
},
gtk::ToggleButton {
Expand All @@ -278,6 +279,7 @@ impl Component for StyleToolbar {

create_icon(Color::red()),

set_tooltip: "Red",
ActionablePlus::set_action::<ColorAction>: ColorButtons::Red,
},
gtk::ToggleButton {
Expand All @@ -286,6 +288,7 @@ impl Component for StyleToolbar {

create_icon(Color::green()),

set_tooltip: "Green",
ActionablePlus::set_action::<ColorAction>: ColorButtons::Green,
},
gtk::ToggleButton {
Expand All @@ -294,13 +297,15 @@ impl Component for StyleToolbar {

create_icon(Color::blue()),

set_tooltip: "Blue",
ActionablePlus::set_action::<ColorAction>: ColorButtons::Blue
},
gtk::ToggleButton {
set_focusable: false,
set_hexpand: false,

create_icon(Color::cove()),
set_tooltip: "Cove",

ActionablePlus::set_action::<ColorAction>: ColorButtons::Cove,
},
Expand All @@ -313,7 +318,7 @@ impl Component for StyleToolbar {
#[watch]
set_from_pixbuf: Some(&model.custom_color_pixbuf)
},

set_tooltip: "Custom color",
ActionablePlus::set_action::<ColorAction>: ColorButtons::Custom,
},
gtk::Button {
Expand All @@ -322,6 +327,7 @@ impl Component for StyleToolbar {
set_hexpand: false,

set_icon_name: "color-regular",
set_tooltip: "Pick custom color",

connect_clicked => StyleToolbarInput::ShowColorDialog,
},
Expand All @@ -331,23 +337,23 @@ impl Component for StyleToolbar {
set_hexpand: false,

set_label: "S",
set_tooltip: "Small font size",
set_tooltip: "Small size",
ActionablePlus::set_action::<SizeAction>: Size::Small,
},
gtk::ToggleButton {
set_focusable: false,
set_hexpand: false,

set_label: "M",
set_tooltip: "Medium font size",
set_tooltip: "Medium size",
ActionablePlus::set_action::<SizeAction>: Size::Medium,
},
gtk::ToggleButton {
set_focusable: false,
set_hexpand: false,

set_label: "L",
set_tooltip: "Large font size",
set_tooltip: "Large size",
ActionablePlus::set_action::<SizeAction>: Size::Large,
},

Expand Down

0 comments on commit 81d385b

Please sign in to comment.