mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 13:36:45 +00:00
ability to have thick guides
This commit is contained in:
parent
67aae07781
commit
d471fc41fc
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user