Update Platform Controls (#13751)
Continuing from #13597, this PR refactors platform controls to extract a generic set of platform controls that can be used for any platform that does not define it's own/we don't use the system ones. In the future, these controls will likely be used as a fallback on windows as well when the windows icon font isn't available. Release Notes: - Added updated window controls on Linux
This commit is contained in:
@@ -146,6 +146,10 @@ pub enum IconName {
|
||||
FontSize,
|
||||
FontWeight,
|
||||
Github,
|
||||
GenericMinimize,
|
||||
GenericMaximize,
|
||||
GenericClose,
|
||||
GenericRestore,
|
||||
Hash,
|
||||
HistoryRerun,
|
||||
Indicator,
|
||||
@@ -290,6 +294,10 @@ impl IconName {
|
||||
IconName::FontSize => "icons/font_size.svg",
|
||||
IconName::FontWeight => "icons/font_weight.svg",
|
||||
IconName::Github => "icons/github.svg",
|
||||
IconName::GenericMinimize => "icons/generic_minimize.svg",
|
||||
IconName::GenericMaximize => "icons/generic_maximize.svg",
|
||||
IconName::GenericClose => "icons/generic_close.svg",
|
||||
IconName::GenericRestore => "icons/generic_restore.svg",
|
||||
IconName::Hash => "icons/hash.svg",
|
||||
IconName::HistoryRerun => "icons/history_rerun.svg",
|
||||
IconName::Indicator => "icons/indicator.svg",
|
||||
|
||||
@@ -23,6 +23,7 @@ pub enum Color {
|
||||
Selected,
|
||||
Success,
|
||||
Warning,
|
||||
Custom(Hsla),
|
||||
}
|
||||
|
||||
impl Color {
|
||||
@@ -46,6 +47,7 @@ impl Color {
|
||||
Color::Selected => cx.theme().colors().text_accent,
|
||||
Color::Success => cx.theme().status().success,
|
||||
Color::Warning => cx.theme().status().warning,
|
||||
Color::Custom(color) => *color,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user