Skip to content

Commit

Permalink
hyperfocal: __main__.py: Fixed grid icon status permanence
Browse files Browse the repository at this point in the history
Fixed grid icon permanence after the app is restarted
  • Loading branch information
okawo80085 committed Oct 18, 2021
1 parent 0c0ca1a commit 7352858
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hyperfocal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,20 @@ def toggle_grid(
layer=1
)

grid_button_icon = img_proc.open_image_with_alpha(
f'{DATA_DIR}/icons/grid_button.png'
)

if not app_settings['use_grid']:
alpha_mask = grid_button_icon[1]
alpha_mask *= 0.5
grid_button_icon = (grid_button_icon[0], alpha_mask)

toggle_grid_setting = ui.CanvasAlphaObject(
np.array(
(0.5, 0.15)
) * app_settings['preview_resolution'] - (25, 25),
*img_proc.open_image_with_alpha(f'{DATA_DIR}/icons/grid_button.png'),
*grid_button_icon,
None,
layer=1
)
Expand Down

0 comments on commit 7352858

Please sign in to comment.