fix: padding, spacing, context menu style, and settings buttons

This commit is contained in:
Vukašin Vojinović 2024-09-24 15:52:17 +02:00 • committed by GitHub
parent 0a32d27c70
commit 941cbf546b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 694 additions and 538 deletions

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Taste
battery = Akku
battery-desc = Reduzierter Stromverbrauch und Leistung.
balanced = Ausgeglichen
@ -12,4 +11,4 @@ hours = h
until-empty = bis leer
power-settings = Energie- und Akkueinstellungen...
dgpu-running = Dedizierte GPU ist aktiv und kann die Akkulaufzeit reduzieren
dgpu-applications = Anwendungen, die die dedizierte GPU {$gpu_name} nutzen
dgpu-applications = Anwendungen, die die dedizierte GPU {$gpu_name} nutzen

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Button
battery = Battery
battery-desc = Reduced power usage and performance.
balanced = Balanced
@ -10,6 +9,6 @@ seconds = s
minutes = m
hours = h
until-empty = until empty
power-settings = Power and Battery Settings...
power-settings = Power & Battery settings...
dgpu-running = Discrete GPU is active and can reduce battery life
dgpu-applications = Applications using {$gpu_name} discrete GPU
dgpu-applications = Applications using {$gpu_name} discrete GPU

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Botón de Cosmic
battery = Ahorro de energía
battery-desc = Rendimiento y uso de energía reducido.
balanced = Balanceado

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Botón Cosmic
battery = Batería
battery-desc = Rendimiento y consumo de alimentación reducidos.
balanced = Balanceado

View file

@ -1,4 +1,3 @@
cosmic-applet-button = دکمه Cosmic
battery = باتری
battery-desc = کاهش مصرف برق و عملکرد.
balanced = متعادل

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Painike
battery = Akku
battery-desc = Vähentynyt virrankulutus ja suorituskyky.
balanced = Tasapainoitettu

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Bouton Cosmic
battery = Batterie
battery-desc = Performance et consommation réduites.
balanced = Équilibré
@ -12,4 +11,4 @@ hours = h
until-empty = avant la décharge totale
power-settings = Paramètres d'alimentation...
dgpu-running = Le GPU dédié est actif et peu réduire l'autonomie de la batterie
dgpu-applications = Applications utilisant le GPU dédié {$gpu_name}
dgpu-applications = Applications utilisant le GPU dédié {$gpu_name}

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Gomb
battery = Akkumulátor
battery-desc = Csökkentett energiafogyasztás és teljesítmény.
balanced = Kiegyensúlyozott
@ -12,4 +11,4 @@ hours = h
until-empty = lemerülésig
power-settings = Tápellátás és akkumulátor beállítások...
dgpu-running = A dedikált GPU aktív, és csökkentheti az akkumulátor élettartamát
dgpu-applications = A {$gpu_name} dedikált GPU-t használó alkalmazások
dgpu-applications = A {$gpu_name} dedikált GPU-t használó alkalmazások

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Tombol Cosmic
battery = Baterai
battery-desc = Penggunaan daya dan kinerja yang dikurangi.
balanced = Seimbang
@ -7,9 +6,9 @@ performance = Kinerja Tinggi
performance-desc = Kinerja dan penggunaan daya yang tinggi.
max-charge = Tingkatkan masa pakai baterai Anda dengan mengatur nilai pengisian maksimum 80%
seconds = d
minutes = m
minutes = m
hours = j
until-empty = hingga kosong
power-settings = Pengaturan Daya dan Baterai...
dgpu-running = GPU Diskrit aktif dan dapat mengurangi masa pakai baterai
dgpu-applications = Aplikasi yang menggunakan {$gpu_name} GPU Diskrit
dgpu-applications = Aplikasi yang menggunakan {$gpu_name} GPU Diskrit

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Pulsante Cosmic
battery = Batteria
battery-desc = Consumi e performance ridotte.
balanced = Bilanciato
@ -12,4 +11,4 @@ hours = h
until-empty = fino alla scarica
power-settings = Impostazioni energetiche
dgpu-running = La GPU discreta è attiva e può ridurre la durata della batteria.
dgpu-applications = Applicazioni che stanno usando la GPU discreta {$gpu_name}
dgpu-applications = Applicazioni che stanno usando la GPU discreta {$gpu_name}

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmicボタン
battery = バッテリー
battery-desc = 性能と消費は低くなります。
balanced = バランス

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Knop
battery = Batterij
battery-desc = Verminderd stroom verbruik en prestatie.
balanced = Gebalanceerd

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Przycisk Cosmic
battery = Na Baterii
battery-desc = Zmniejszone zużycie energii i zmniejszona wydajność.
balanced = Zbalansowany

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Botão Cosmic
battery = Bateria
battery-desc = Uso reduzido de energia e desempenho.
balanced = Equilibrado

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Botão Cosmic
battery = Bateria
battery-desc = Uso reduzido de energia e desempenho.
balanced = Equilibrado

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Кнопка Cosmic
battery = Аккумулятор
battery-desc = Пониженные энергопотребление и производительность.
balanced = Сбалансированный
@ -12,4 +11,4 @@ hours = ч.
until-empty = до полного разряда
power-settings = Параметры питания и аккумулятора...
dgpu-running = Дискретная видеокарта активна и может сократить время автономной работы
dgpu-applications = Приложения, использующие видеокарту {$gpu_name}
dgpu-applications = Приложения, использующие видеокарту {$gpu_name}

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Button
battery = Batéria
battery-desc = Obmedzená spotreba energie a výkonu.
balanced = Vyvážený
@ -12,4 +11,4 @@ hours = h
until-empty = pokiaľ prázdne
power-settings = Nastavenia napájania a batérie...
dgpu-running = Diskrétne GPU sa práve používa. To môže ovplyvniť životnosť batérie.
dgpu-applications = Aplikácie, ktoré používajú {$gpu_name} diskrétne GPU
dgpu-applications = Aplikácie, ktoré používajú {$gpu_name} diskrétne GPU

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic дугме
battery = Батерија
battery-desc = Смањене перформансе и потрошња батерије.
balanced = Балансирано

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic dugme
battery = Baterija
battery-desc = Smanjene performanse i potrošnja baterije.
balanced = Balansirano

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic Düğmesi
battery = Pil
battery-desc = Daha az güç tüketimi ve başarım.
balanced = Dengeli

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Кнопка Cosmic
battery = Акумулятор
battery-desc = Зменшення споживання енергії та продуктивності.
balanced = Збалансовано

View file

@ -1,4 +1,3 @@
cosmic-applet-button = Cosmic 按钮
battery = 省电
battery-desc = 降低功耗和性能
balanced = 平衡

View file

@ -17,6 +17,7 @@ use cosmic::{
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
},
cctk::sctk::reexports::calloop,
cosmic_theme::Spacing,
iced::{
alignment::Horizontal,
wayland::popup::{destroy_popup, get_popup},
@ -27,6 +28,7 @@ use cosmic::{
iced_runtime::core::layout::Limits,
iced_style::application,
iced_widget::{Column, Row},
theme,
widget::{divider, horizontal_space, icon, scrollable, text, vertical_space},
Command, Element, Theme,
};
@ -446,6 +448,10 @@ impl cosmic::Application for CosmicBatteryApplet {
}
fn view_window(&self, _id: window::Id) -> Element<Message> {
let Spacing {
space_xxs, space_s, ..
} = theme::active().cosmic().spacing;
let name = text::body(fl!("battery"));
let description = text::caption(if !self.on_battery {
format!("{:.0}%", self.battery_percent)
@ -468,7 +474,9 @@ impl cosmic::Application for CosmicBatteryApplet {
.align_items(Alignment::Center),
)
.into(),
padded_control(divider::horizontal::default()).into(),
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
menu_button(
row![
column![
@ -532,7 +540,9 @@ impl cosmic::Application for CosmicBatteryApplet {
)
.on_press(Message::SelectProfile(Power::Performance))
.into(),
padded_control(divider::horizontal::default()).into(),
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
padded_control(
anim!(
//toggler
@ -546,7 +556,9 @@ impl cosmic::Application for CosmicBatteryApplet {
.width(Length::Fill),
)
.into(),
padded_control(divider::horizontal::default()).into(),
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
];
if let Some(max_screen_brightness) = self.max_screen_brightness {
@ -605,7 +617,11 @@ impl cosmic::Application for CosmicBatteryApplet {
}
}
content.push(padded_control(divider::horizontal::default()).into());
content.push(
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
);
if !self.gpus.is_empty() {
content.push(
@ -637,7 +653,11 @@ impl cosmic::Application for CosmicBatteryApplet {
)
.into(),
);
content.push(padded_control(divider::horizontal::default()).into());
content.push(
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
);
}
for (key, gpu) in &self.gpus {
@ -706,7 +726,11 @@ impl cosmic::Application for CosmicBatteryApplet {
.into(),
);
}
content.push(padded_control(divider::horizontal::default()).into());
content.push(
padded_control(divider::horizontal::default())
.padding([space_xxs, space_s])
.into(),
);
}
content.push(