ability to have thick guides

This commit is contained in:
viliusle 2021-04-11 22:17:44 +03:00
parent 67aae07781
commit d471fc41fc
2 changed files with 9 additions and 1 deletions

View File

@ -395,6 +395,7 @@ class Base_gui_class {
if(config.guides_enabled == false){
return;
}
var thick_guides = this.Tools_settings.get_setting('thick_guides');
for(var i in config.guides) {
var guide = config.guides[i];
@ -405,7 +406,10 @@ class Base_gui_class {
//set styles
ctx.strokeStyle = '#00b8b8';
ctx.lineWidth = 1;
if(thick_guides == false)
ctx.lineWidth = 1;
else
ctx.lineWidth = 3;
ctx.beginPath();
if (guide.y === null) {

View File

@ -25,6 +25,7 @@ class Tools_settings_class {
var exit_confirm = this.get_setting('exit_confirm');
var default_units = this.get_setting('default_units');
var resolution = this.get_setting('resolution');
var thick_guides = this.get_setting('thick_guides');
var settings = {
title: 'Settings',
@ -40,6 +41,7 @@ class Tools_settings_class {
{name: "guides", title: "Enable guides:", value: guides},
{name: "safe_search", title: "Safe search:", value: safe_search},
{name: "exit_confirm", title: "Exit confirmation:", value: exit_confirm},
{name: "thick_guides", title: "Thick guides:", value: thick_guides},
],
on_change: function (params) {
this.Base_gui.change_theme(params.theme);
@ -66,6 +68,7 @@ class Tools_settings_class {
this.save_setting('exit_confirm', params.exit_confirm);
this.save_setting('default_units', params.default_units);
this.save_setting('resolution', params.resolution);
this.save_setting('thick_guides', params.thick_guides);
//update config
config.TRANSPARENCY = this.get_setting('transparency');
@ -114,6 +117,7 @@ class Tools_settings_class {
'exit_confirm': true,
'default_units': 'pixels',
'resolution': 72,
'thick_guides': false,
};
var value = this.Helper.getCookie(key);