diff --git a/src/Palette/PaletteGrid.gd b/src/Palette/PaletteGrid.gd index 34dd6fa19..76375cd92 100644 --- a/src/Palette/PaletteGrid.gd +++ b/src/Palette/PaletteGrid.gd @@ -69,8 +69,8 @@ func draw_palette() -> void: var grid_index := i + grid_size.x * j var index := convert_grid_index_to_palette_index(grid_index) var swatch := swatches[grid_index] - swatch.show_left_highlight = false - swatch.show_right_highlight = false + swatch.show_left_highlight = Palettes.left_selected_color == index + swatch.show_right_highlight = Palettes.right_selected_color == index var color = current_palette.get_color(index) if color != null: swatch.color = color diff --git a/src/Palette/PaletteScroll.gd b/src/Palette/PaletteScroll.gd index 4771a71ab..0d0dec396 100644 --- a/src/Palette/PaletteScroll.gd +++ b/src/Palette/PaletteScroll.gd @@ -81,10 +81,12 @@ func _on_PaletteScroll_gui_input(event: InputEvent) -> void: palette_grid.change_swatch_size(Vector2i.ONE) else: scroll_vector = Vector2i.LEFT if event.shift_pressed else Vector2i.UP - if event.button_index == MOUSE_BUTTON_WHEEL_DOWN: + elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN: if event.ctrl_pressed: palette_grid.change_swatch_size(-Vector2i.ONE) else: scroll_vector = Vector2i.RIGHT if event.shift_pressed else Vector2i.DOWN + else: + return resize_grid() set_sliders(palette_grid.current_palette, palette_grid.grid_window_origin + scroll_vector) diff --git a/src/Palette/PaletteSwatch.gd b/src/Palette/PaletteSwatch.gd index 1c7d7699f..bcb6937e2 100644 --- a/src/Palette/PaletteSwatch.gd +++ b/src/Palette/PaletteSwatch.gd @@ -34,12 +34,12 @@ func set_swatch_size(swatch_size: Vector2) -> void: func _draw() -> void: if not empty: # Black border around swatches with a color - draw_rect(Rect2(Vector2.ZERO, size), Color.BLACK, false, 1) + draw_rect(Rect2(Vector2.ONE, size), Color.BLACK, false, 1) if show_left_highlight: # Display outer border highlight - draw_rect(Rect2(Vector2.ZERO, size), Color.WHITE, false, 1) - draw_rect(Rect2(Vector2.ONE, size - Vector2(2, 2)), Color.BLACK, false, 1) + draw_rect(Rect2(Vector2.ONE, size), Color.WHITE, false, 1) + draw_rect(Rect2(Vector2(2, 2), size - Vector2(2, 2)), Color.BLACK, false, 1) if show_right_highlight: # Display inner border highlight