diff --git a/autoload/layout_manager.gd b/autoload/layout_manager.gd index b7b7a6b..b5bc5b1 100644 --- a/autoload/layout_manager.gd +++ b/autoload/layout_manager.gd @@ -65,12 +65,12 @@ func remove_tile(tile_id: String) -> void: ## Save the current layout to config/layouts/{name}.cfg -func save_layout(name: String = "") -> void: - if name.is_empty(): - name = current_layout_name +func save_layout(layout_name: String = "") -> void: + if layout_name.is_empty(): + layout_name = current_layout_name var cfg := ConfigFile.new() - cfg.set_value("layout", "name", name) + cfg.set_value("layout", "name", layout_name) cfg.set_value("layout", "saved_at", Time.get_datetime_string_from_system()) var tile_ids: Array = _layout.keys() @@ -85,11 +85,11 @@ func save_layout(name: String = "") -> void: cfg.set_value(section, "w", entry.get("w", 1)) cfg.set_value(section, "h", entry.get("h", 1)) - var path := LAYOUT_DIR.path_join(name + ".cfg") + var path := LAYOUT_DIR.path_join(layout_name + ".cfg") var result := cfg.save(path) if result == OK: - current_layout_name = name - layout_saved.emit(name) + current_layout_name = layout_name + layout_saved.emit(layout_name) ## Load a saved layout, replacing the current in-memory layout. @@ -141,9 +141,9 @@ func get_layout_names() -> PackedStringArray: ## Switch to a different layout: saves current, loads new, emits signal. -func switch_layout(name: String) -> void: - if name == current_layout_name: +func switch_layout(layout_name: String) -> void: + if layout_name == current_layout_name: return save_layout(current_layout_name) - load_layout(name) - set_current_layout(name) + load_layout(layout_name) + set_current_layout(layout_name) diff --git a/plugins/system_monitor/tiles/testing/testing_tile.gd b/plugins/system_monitor/tiles/testing/testing_tile.gd index 1fdd52e..7cb817f 100644 --- a/plugins/system_monitor/tiles/testing/testing_tile.gd +++ b/plugins/system_monitor/tiles/testing/testing_tile.gd @@ -17,7 +17,7 @@ func initialize() -> void: _style() -func refresh(data: Dictionary) -> void: +func refresh(_data: Dictionary) -> void: _cycle = (_cycle + 1) % _levels.size() var target: float = _levels[_cycle] diff --git a/scripts/dashboard_grid.gd b/scripts/dashboard_grid.gd index 7854179..00bea11 100644 --- a/scripts/dashboard_grid.gd +++ b/scripts/dashboard_grid.gd @@ -5,7 +5,7 @@ class_name DashboardGrid signal module_placed(module: Control, col: int, row: int) signal module_removed(module: Control) -signal module_resized(module: Control, col: int, row: int, w: int, h: int) +signal module_resized(module: Control, col: int, row: int) @export var cell_min_size: Vector2 = Vector2(300, 240) @export var cell_spacing: float = 8.0 @@ -196,7 +196,7 @@ func _make_menu_button(text: String, tooltip: String) -> Button: btn.text = text btn.tooltip_text = tooltip btn.flat = true - btn.minimum_size = MENU_BUTTON_MIN_SIZE + btn.custom_minimum_size = MENU_BUTTON_MIN_SIZE btn.add_theme_font_size_override("font_size", MENU_BUTTON_FONT_SIZE) return btn @@ -614,7 +614,7 @@ func _end_resize(_mouse_pos: Vector2) -> void: _set_module_grid_data(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h) _occupy_cells(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h) _layout_cells() - module_resized.emit(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h) + module_resized.emit(_resize_module, _resize_origin_col, _resize_origin_row) _is_resizing = false _resize_module = null