theme: load the shared bread-theme stylesheet
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.
This commit is contained in:
parent
1959a86157
commit
0cb27ec1c4
2 changed files with 8 additions and 3 deletions
|
|
@ -9,9 +9,10 @@ thread_local! {
|
|||
|
||||
fn load_css() -> String {
|
||||
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!(
|
||||
"* {{ 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}; }}\
|
||||
.workspace-btn {{ background: transparent; color: {fg}; opacity: 0.45;\
|
||||
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`.
|
||||
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();
|
||||
PROVIDER.with(|cell| bgtk::apply_css(&css, cell));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue