Skip to content

Conversation

@Video-Nomad
Copy link
Contributor

@Video-Nomad Video-Nomad commented Dec 5, 2025

  • Added rain and snow animations for hourly widget via
    WeatherAnimationManager.
  • Added gradient effect drawn under the hourly weather line.
  • Added caching of static content for hourly widget. Cache is cleared when widget is closed. Only animated parts are redrawn in full. Cached data is just blited from pre-rendered pixmaps.
  • Better calculation for text and current line position.
  • Added supporting utils.py and debug.py modules. Debug data can be generated via option toggle. Useful for styling.
  • Introduced ColorFetchWidget for fetching colors from stylesheet. Used for gradient, rain and snow colors. Basically, a dummy widget that has the class name that we need and is only used to get the colors, nothing else. Hidden and inactive.
  • Added super sketchy border-radius regex fetch from the stylesheet (in HourlyDataLineWidget) because Qt does not provide with a reliable way to get this data.
  • Updated configuration schema.
  • Fixed some typing.

Relevant config:

weather:
  type: "yasb.weather.WeatherWidget"
  options:
    weather_card:
      hourly_gradient:
        enabled: true
        top_color: "#8EAEE8"
        bottom_color: "#2A3E68"
      weather_animation:
        enabled: true
        snow_overrides_rain: true
        temp_line_animation_style: both # can be "rain", "snow", "both", or "none"
        rain_effect_intensity: 1.0 # 0.01 - 10.0
        snow_effect_intensity: 1.0 # 0.01 - 10.0
        scale_with_chance: true
        enable_debug: false # Can be used to generate fake data for styling and testing

Relevant styling:

.weather-card .hourly-data .hourly-rain-animation {
    color: rgba(150, 200, 255, 40);
    background-color: rgba(0, 0, 0, 0.1);
}

.weather-card .hourly-data .hourly-snow-animation {
    color: rgba(255, 255, 255, 150);
    background-color: rgba(0, 0, 0, 0.1);
}

Fake debug data is used for the demo (ignore the temperatures):

7112B2zIKl.mp4

@Video-Nomad Video-Nomad force-pushed the feat/weather-hourly-animation-gradient branch from 1644391 to fc85afc Compare December 5, 2025 12:49
- Added rain and snow animations for hourly widget via
  WeatherAnimationManager.
- Added gradient effect drawn under the hourly weather line.
- Added caching of static content for hourly widget. Cache is cleared
  when widget is closed.
- Better calculation for text and current line position.
- Added supporting utility and debug modules.
- Introduced ColorFetchWidget for fetching colors from stylesheet.
- Updated configuration schema.
@Video-Nomad Video-Nomad force-pushed the feat/weather-hourly-animation-gradient branch from fc85afc to 185810e Compare December 6, 2025 19:14
@amnweb amnweb merged commit f724601 into amnweb:main Dec 6, 2025
3 checks passed
@Video-Nomad Video-Nomad deleted the feat/weather-hourly-animation-gradient branch December 10, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants