Remove other button classes
parent
da94b2b994
commit
c05eaf0547
8
TODO.md
8
TODO.md
|
@ -293,11 +293,9 @@ Prankily wait for next user input before fullscreening and bluescreening
|
|||
|
||||
|
||||
* CSS
|
||||
* Shouldn't need classes `.jspaint-window-button` (`.jspaint-window-titlebar button`) or `.jspaint-dialogue-button` (`.jspaint-window-content button`) at all
|
||||
* DRY, especially for the buttons
|
||||
* Seriously, the buttons
|
||||
* Also other `.jspaint-` classes
|
||||
* Deal with `z-index`es
|
||||
* DRY, especially button styles
|
||||
* Get rid of all `.jspaint-` prefixes
|
||||
* Deal with `z-index` rules?
|
||||
* Comment stuff?
|
||||
* Use a CSS preprocessor so we can do color-swap themes (maybe even load Windows theme files)
|
||||
* Stuff should go in an OS GUI library with themes for Windows 98 and other OSes
|
||||
|
|
|
@ -11,7 +11,7 @@ function $ToolBox(){
|
|||
});
|
||||
|
||||
var $buttons = $($.map(tools, function(tool, i){
|
||||
var $b = $(E("button")).addClass("jspaint-tool");
|
||||
var $b = $(E("div")).addClass("jspaint-tool");
|
||||
$b.appendTo($tools);
|
||||
tool.$button = $b;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ function $Window($component){
|
|||
var $w = $(E("div")).addClass("jspaint-window").appendTo("body");
|
||||
$w.$titlebar = $(E("div")).addClass("jspaint-window-titlebar").appendTo($w);
|
||||
$w.$title = $(E("span")).addClass("jspaint-window-title").appendTo($w.$titlebar);
|
||||
$w.$x = $(E("button")).addClass("jspaint-window-close-button jspaint-window-button").appendTo($w.$titlebar);
|
||||
$w.$x = $(E("button")).addClass("jspaint-window-close-button").appendTo($w.$titlebar);
|
||||
$w.$content = $(E("div")).addClass("jspaint-window-content").appendTo($w);
|
||||
|
||||
if($component){
|
||||
|
@ -143,7 +143,6 @@ function $Window($component){
|
|||
$w.$Button = function(text, handler){
|
||||
var $b = $(E("button"))
|
||||
.appendTo($w.$content)
|
||||
.addClass("jspaint-dialogue-button")
|
||||
.text(text)
|
||||
.on("click", function(){
|
||||
if(handler){
|
||||
|
@ -200,9 +199,6 @@ function $FormWindow(title){
|
|||
action();
|
||||
});
|
||||
|
||||
// this should really not be needed @TODO
|
||||
$b.addClass("jspaint-dialogue-button");
|
||||
|
||||
$b.on("pointerdown", function(){
|
||||
$b.focus();
|
||||
});
|
||||
|
|
|
@ -52,7 +52,7 @@ function manage_storage(){
|
|||
var $tr = $(E("tr")).appendTo($table);
|
||||
|
||||
var $img = $(E("img")).attr({src: imgSrc});
|
||||
var $remove = $(E("button")).addClass("jspaint-dialogue-button").text("Remove");
|
||||
var $remove = $(E("button")).text("Remove");
|
||||
var href = "#" + k.replace("image#", "local:");
|
||||
var $link = $(E("a")).attr({href: href, target: "__blank"});
|
||||
$link.append($img);
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.jspaint-window-content .jspaint-dialogue-button {
|
||||
.jspaint-window-content button {
|
||||
margin: 3px;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
|
@ -118,7 +118,7 @@
|
|||
background: transparent;
|
||||
outline: 0;
|
||||
}
|
||||
.jspaint-window-content .jspaint-dialogue-button:before {
|
||||
.jspaint-window-content button:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
|
@ -131,8 +131,8 @@
|
|||
border-right: 1px solid #7b7b7b;
|
||||
border-bottom: 1px solid #7b7b7b;
|
||||
}
|
||||
.jspaint-window-content .jspaint-dialogue-button:hover:active,
|
||||
.jspaint-window-content .jspaint-dialogue-button.pressed,
|
||||
.jspaint-window-content button:hover:active,
|
||||
.jspaint-window-content button.pressed,
|
||||
.jspaint-tool:hover:active,
|
||||
.jspaint-tool.selected {
|
||||
padding-bottom: 2px;
|
||||
|
@ -145,8 +145,8 @@
|
|||
border-right: 1px solid white;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
.jspaint-window-content .jspaint-dialogue-button:hover:active:before,
|
||||
.jspaint-window-content .jspaint-dialogue-button.pressed:before,
|
||||
.jspaint-window-content button:hover:active:before,
|
||||
.jspaint-window-content button.pressed:before,
|
||||
.jspaint-tool:hover:active:before,
|
||||
.jspaint-tool.selected:before {
|
||||
top: 0px;
|
||||
|
@ -317,7 +317,7 @@ button.selected,
|
|||
width: 13px;
|
||||
height: 11px;
|
||||
}
|
||||
.jspaint-window-button {
|
||||
.jspaint-window-titlebar button {
|
||||
margin: 2px;
|
||||
}
|
||||
.jspaint-window-content {
|
||||
|
|
Loading…
Reference in New Issue