mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
feat: Add image position presets and sliders
Introduce image positioning presets and UI improvements for image overlay control. image.py: compute overlay coordinates for top-left/top-right/bottom-left/bottom-right/center positions and respect corner offset and opacity. settings.py: replace spinboxes with horizontal sliders (with value labels and custom style), add Wallpaper Mode checkbox and Position combo, wire controls to state and include them in the settings tab; ensure dialog rollback restores new temp settings. config/config.py & utils/settings.py: persist and load new image_as_wallpaper and image_position settings and extend save_settings to accept them. data/state.py: add new state fields and properties for image_position, custom position flags and x/y coordinates; change default image_as_wallpaper to false. These changes enable preset positioning, improved UX for sizing/offset/opacity, and persistence of new image options.
This commit is contained in:
@@ -35,7 +35,9 @@ def create_config():
|
||||
"enable_image": str(state.image_enabled),
|
||||
"image_width": str(state.image_width),
|
||||
"image_offset": str(state.image_offset),
|
||||
"image_opacity": str(state.image_opacity)
|
||||
"image_opacity": str(state.image_opacity),
|
||||
"image_as_wallpaper": str(state.image_as_wallpaper),
|
||||
"image_position": str(state.image_position)
|
||||
}
|
||||
|
||||
if platform.system() == "Windows":
|
||||
@@ -102,6 +104,8 @@ def read_config():
|
||||
state.image_width = config.getint("Image", "image_width", fallback=state.image_width)
|
||||
state.image_offset = config.getint("Image", "image_offset", fallback=state.image_offset)
|
||||
state.image_opacity = config.getint("Image", "image_opacity", fallback=state.image_opacity)
|
||||
state.image_as_wallpaper = config.getboolean("Image", "image_as_wallpaper", fallback=state.image_as_wallpaper)
|
||||
state.image_position = config.get("Image", "image_position", fallback=state.image_position)
|
||||
|
||||
create_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user