fix: styling

This commit is contained in:
Ashley Wulber 2023-10-10 19:58:35 -04:00 committed by Ashley Wulber
parent 4107f18d81
commit 2a99ad959a
4 changed files with 18 additions and 13 deletions

View file

@ -421,7 +421,6 @@ impl cosmic::Application for CosmicBluetoothApplet {
])
.style(Button::Text)
.padding([8, 24])
.style(button_style())
.on_press(Message::ToggleVisibleDevices(!self.show_visible_devices));
content = content.push(available_connections_btn);
let mut list_column: Vec<Element<'_, Message>> =

View file

@ -1,12 +1,13 @@
use crate::dbus::{self, PowerDaemonProxy};
use crate::fl;
use crate::graphics::{get_current_graphics, set_graphics, Graphics};
use cosmic::app::command::message::cosmic;
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
use cosmic::iced_runtime::core::alignment::Horizontal;
use cosmic::iced_runtime::core::Alignment;
use cosmic::iced_style::application;
use cosmic::theme::Button;
use cosmic::widget::icon;
use cosmic::widget::{icon, Icon};
use cosmic::{
applet::{button_theme, cosmic_panel_config::PanelAnchor},
Command,
@ -222,13 +223,21 @@ impl cosmic::Application for Window {
.applet
.icon_button(ID)
.on_press(Message::TogglePopup)
.style(Button::Text)
.into(),
PanelAnchor::Top | PanelAnchor::Bottom => button(
row![
icon::from_name(ID)
.size(self.core.applet.suggested_size().0)
.symbolic(true),
Icon::from(
icon::from_name(ID)
.size(self.core.applet.suggested_size().0)
.symbolic(true)
)
.style(cosmic::theme::Svg::Custom(std::rc::Rc::new(
|theme| {
cosmic::iced_style::svg::Appearance {
color: Some(theme.cosmic().background.on.into()),
}
}
))),
text(match self.graphics_mode.map(|g| g.inner()) {
Some(Graphics::Integrated) => fl!("integrated"),
Some(Graphics::Nvidia) => fl!("nvidia"),

View file

@ -513,7 +513,6 @@ impl cosmic::Application for CosmicNetworkApplet {
.align_items(Alignment::Center)
.spacing(8)
)
.style(Button::Text)
.padding([8, 24])
.style(button_style())
.on_press(Message::Disconnect(name.clone()))]
@ -612,7 +611,6 @@ impl cosmic::Application for CosmicNetworkApplet {
.align_items(Alignment::Center)
.spacing(8),
)
.style(Button::Suggested)
.padding([8, 24])
.width(Length::Fill)
.style(button_style());
@ -647,7 +645,6 @@ impl cosmic::Application for CosmicNetworkApplet {
.width(Length::Fixed(24.0))
.height(Length::Fixed(24.0)),
])
.style(Button::Text)
.padding([8, 24])
.style(button_style())
.on_press(Message::ToggleVisibleNetworks);
@ -681,7 +678,7 @@ impl cosmic::Application for CosmicNetworkApplet {
container(text(fl!("router-wps-button"))).padding(8),
row![
button(container(text(fl!("cancel"))).padding([0, 24]))
.style(Button::Suggested)
.style(Button::Destructive)
.on_press(Message::CancelNewConnection),
button(container(text(fl!("connect"))).padding([0, 24]))
.style(Button::Suggested)
@ -731,7 +728,7 @@ impl cosmic::Application for CosmicNetworkApplet {
text(fl!("check-wifi-connection")),
row![
button(container(text("Cancel")).padding([0, 24]))
.style(Button::Suggested)
.style(Button::Destructive)
.on_press(Message::CancelNewConnection),
button(container(text("Connect")).padding([0, 24]))
.style(Button::Suggested)

View file

@ -297,11 +297,11 @@ impl cosmic::Application for Power {
.size(16),
row![
button(text(fl!("confirm")).size(14))
.padding(2)
.padding(8)
.style(theme::Button::Suggested)
.on_press(Message::Confirm),
button(text(fl!("cancel")).size(14))
.padding(2)
.padding(8)
.style(theme::Button::Standard)
.on_press(Message::Cancel),
]