mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
Add configurable image overlay settings
Introduce configurable image overlay options and persist them. Added new state fields (image_width, image_offset, image_enabled) with defaults and wired them into the image overlay: the image display now respects the enabled flag, uses image_width for scaling and image_offset for placement. Extended the Settings dialog (resized, API field sizing) with a new Image tab containing enable checkbox, width and offset spinboxes, and included these values when saving. Updated config read/write to include an Image section so settings persist across runs and extended save_settings to accept image_width and image_offset. Minor import/order cleanup in image dialog.
This commit is contained in:
@@ -5,7 +5,7 @@ from utils.data.state import state
|
||||
|
||||
|
||||
|
||||
def save_settings(close=lambda: None, apiurl=None, download_path=None, down_speed_limit=None, up_speed_limit=None, image_path=None, autoresume=None, max_connections=None, max_downloads=None, bound_interface=None):
|
||||
def save_settings(close=lambda: None, apiurl=None, download_path=None, down_speed_limit=None, up_speed_limit=None, image_path=None, autoresume=None, max_connections=None, max_downloads=None, bound_interface=None, image_width=None, image_offset=None):
|
||||
if apiurl is not None:
|
||||
state.api_url = apiurl
|
||||
if download_path is not None:
|
||||
@@ -24,8 +24,12 @@ def save_settings(close=lambda: None, apiurl=None, download_path=None, down_spee
|
||||
state.max_downloads = max_downloads
|
||||
if bound_interface is not None:
|
||||
state.bound_interface = None if bound_interface == "None" else bound_interface
|
||||
if image_width is not None:
|
||||
state.image_width = image_width
|
||||
if image_offset is not None:
|
||||
state.image_offset = image_offset
|
||||
|
||||
update_settings()
|
||||
update_settings() # Update LibTorrent Session Settings
|
||||
consoleLog("Saved Settings")
|
||||
create_config()
|
||||
close()
|
||||
|
||||
Reference in New Issue
Block a user