refactor: icon styling and headerbar icon styling
Headerbar icons are transparent when their window is not focused, but otherwise share the same style as icons with selection. This updates the icon styles to match figma when selected.
This commit is contained in:
parent
6f6eeec0e7
commit
e47684ffdb
11 changed files with 121 additions and 115 deletions
|
|
@ -642,6 +642,10 @@ impl<App: Application> ApplicationExt for App {
|
|||
fn view_main(&self) -> Element<Message<Self::Message>> {
|
||||
let core = self.core();
|
||||
let is_condensed = core.is_condensed();
|
||||
let focused = core
|
||||
.focused_window()
|
||||
.map(|i| i == self.main_window_id())
|
||||
.unwrap_or_default();
|
||||
|
||||
let content_row = crate::widget::row::with_children({
|
||||
let mut widgets = Vec::with_capacity(2);
|
||||
|
|
@ -686,7 +690,7 @@ impl<App: Application> ApplicationExt for App {
|
|||
.push_maybe(if core.window.show_headerbar {
|
||||
Some({
|
||||
let mut header = crate::widget::header_bar()
|
||||
.window_id(self.main_window_id())
|
||||
.focused(focused)
|
||||
.title(&core.window.header_title)
|
||||
.on_drag(Message::Cosmic(cosmic::Message::Drag))
|
||||
.on_close(Message::Cosmic(cosmic::Message::Close))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue