stylix font size
This commit is contained in:
@@ -38,7 +38,17 @@ def generate_stylix_css():
|
||||
|
||||
# Default font
|
||||
font_family = fonts.get("sansSerif", "sans-serif")
|
||||
font_size = fonts.get("sizes", {}).get("applications", 14)
|
||||
font_sizes = fonts.get("sizes", {})
|
||||
# Use desktop font size for the bar, fallback to applications, then default
|
||||
font_size = font_sizes.get("desktop", font_sizes.get("applications", 14))
|
||||
|
||||
# Calculate relative font sizes
|
||||
small_font = max(int(font_size * 0.85), 10) # Minimum 10px
|
||||
large_font = int(font_size * 1.1)
|
||||
|
||||
# Debug logging
|
||||
from loguru import logger
|
||||
logger.info(f"[Stylix] Using font sizes - Base: {font_size}px, Small: {small_font}px, Large: {large_font}px")
|
||||
|
||||
# Generate GTK CSS with Stylix colors
|
||||
css_content = f"""/* Stylix-generated theme */
|
||||
@@ -80,7 +90,7 @@ def generate_stylix_css():
|
||||
|
||||
#bat-label {{
|
||||
color: #{colors["base05"]};
|
||||
font-size: 14px;
|
||||
font-size: {font_size}px;
|
||||
}}
|
||||
|
||||
#bat-label.battery-low {{
|
||||
@@ -143,6 +153,7 @@ def generate_stylix_css():
|
||||
#calendar-title {{
|
||||
color: #{colors["base05"]};
|
||||
font-weight: bold;
|
||||
font-size: {large_font}px;
|
||||
margin-bottom: 8px;
|
||||
}}
|
||||
|
||||
@@ -175,7 +186,7 @@ def generate_stylix_css():
|
||||
|
||||
.event-title {{
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
font-size: {font_size}px;
|
||||
}}
|
||||
|
||||
.event-title.upcoming {{
|
||||
@@ -187,7 +198,7 @@ def generate_stylix_css():
|
||||
}}
|
||||
|
||||
.event-time {{
|
||||
font-size: 11px;
|
||||
font-size: {small_font}px;
|
||||
}}
|
||||
|
||||
.event-time.upcoming {{
|
||||
@@ -199,7 +210,7 @@ def generate_stylix_css():
|
||||
}}
|
||||
|
||||
.event-location {{
|
||||
font-size: 11px;
|
||||
font-size: {small_font}px;
|
||||
}}
|
||||
|
||||
.event-location.upcoming {{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#calendar-title {
|
||||
color: var(--foreground);
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
#no-events {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-size: 0.85em;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
@@ -53,7 +54,7 @@
|
||||
|
||||
.event-title {
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.event-title.upcoming {
|
||||
@@ -65,7 +66,7 @@
|
||||
}
|
||||
|
||||
.event-time {
|
||||
font-size: 11px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.event-time.upcoming {
|
||||
@@ -77,7 +78,7 @@
|
||||
}
|
||||
|
||||
.event-location {
|
||||
font-size: 11px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.event-location.upcoming {
|
||||
|
||||
Reference in New Issue
Block a user