mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Feature : color palette
- Fixed : manager UI is redrawn after save - the Selected palette is saved as a user preference - default background is now the dark one - the selected palette is not reset after closing palette manager
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
ns.UserSettings = {
|
||||
GRID_WIDTH : 'GRID_WIDTH',
|
||||
CANVAS_BACKGROUND : 'CANVAS_BACKGROUND',
|
||||
SELECTED_PALETTE : 'SELECTED_PALETTE',
|
||||
|
||||
KEY_TO_DEFAULT_VALUE_MAP_ : {
|
||||
'GRID_WIDTH' : 0,
|
||||
'CANVAS_BACKGROUND' : 'medium-canvas-background'
|
||||
'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background',
|
||||
'SELECTED_PALETTE' : Constants.NO_PALETTE_ID
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ if (typeof Function.prototype.bind !== "function") {
|
||||
if (r > 255 || g > 255 || b > 255) {
|
||||
throw "Invalid color component";
|
||||
}
|
||||
|
||||
|
||||
return ((r << 16) | (g << 8) | b).toString(16);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user