theme: load the shared bread-theme stylesheet
All checks were successful
Mirror to GitHub / mirror (push) Successful in 55s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 55s
Call bread_theme::gtk::apply_shared() before breadbar's own rules so fonts, palette, and generic widgets come from the one ecosystem stylesheet (and recolour live). Keep only breadbar-specific CSS (bar window, workspace buttons, stats, notifications, OSD). Bump bread-theme dep to v0.2.6. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
f9fa83e8a2
commit
901b3a3d9f
2 changed files with 8 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ keywords = ["wayland", "hyprland", "bar", "status-bar", "gtk4"]
|
||||||
categories = ["gui"]
|
categories = ["gui"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bread-theme = { git = "https://github.com/Breadway/bread-ecosystem", tag = "v0.1.0", features = ["gtk"] }
|
bread-theme = { git = "https://github.com/Breadway/bread-ecosystem", tag = "v0.2.6", features = ["gtk"] }
|
||||||
gtk4 = { version = "0.11", features = ["v4_12"] }
|
gtk4 = { version = "0.11", features = ["v4_12"] }
|
||||||
gtk4-layer-shell = "0.8"
|
gtk4-layer-shell = "0.8"
|
||||||
relm4 = { version = "0.11", features = ["macros"] }
|
relm4 = { version = "0.11", features = ["macros"] }
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,10 @@ thread_local! {
|
||||||
|
|
||||||
fn load_css() -> String {
|
fn load_css() -> String {
|
||||||
let p = load_palette();
|
let p = load_palette();
|
||||||
|
// breadbar-specific rules only — fonts, base colours, and generic widgets
|
||||||
|
// come from the shared ecosystem stylesheet (applied first in `apply()`).
|
||||||
format!(
|
format!(
|
||||||
"* {{ font-family: 'Varela Round', sans-serif; font-size: 14px; }}\
|
"window.breadbar {{ background-color: {bg_rgba}; border-radius: 0; }}\
|
||||||
window.breadbar {{ background-color: {bg_rgba}; border-radius: 0; }}\
|
|
||||||
label {{ color: {fg}; }}\
|
label {{ color: {fg}; }}\
|
||||||
.workspace-btn {{ background: transparent; color: {fg}; opacity: 0.45;\
|
.workspace-btn {{ background: transparent; color: {fg}; opacity: 0.45;\
|
||||||
border-radius: 0; border: none; outline: none; box-shadow: none;\
|
border-radius: 0; border: none; outline: none; box-shadow: none;\
|
||||||
|
|
@ -50,6 +51,10 @@ pub fn fg_color() -> String {
|
||||||
|
|
||||||
/// Apply (or reload) the theme CSS. Safe to call from `glib::MainContext::invoke`.
|
/// Apply (or reload) the theme CSS. Safe to call from `glib::MainContext::invoke`.
|
||||||
pub fn apply() {
|
pub fn apply() {
|
||||||
|
// Shared ecosystem base (fonts, palette, generic widgets) — applied first
|
||||||
|
// so breadbar's own rules below layer on top.
|
||||||
|
bgtk::apply_shared();
|
||||||
|
|
||||||
let css = load_css();
|
let css = load_css();
|
||||||
PROVIDER.with(|cell| bgtk::apply_css(&css, cell));
|
PROVIDER.with(|cell| bgtk::apply_css(&css, cell));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue