ui: add --color-ui-button variable, adapt modal's theme, show prop name in color picker

This commit is contained in:
bordun 2020-05-14 10:08:23 +02:00
parent 490f14b666
commit ae0d8968a9
7 changed files with 46 additions and 30 deletions

View file

@ -58,11 +58,13 @@ class ColorPicker extends UiWidget {
// })
this.opened = 0
this.label = DOM.get(this.modal.container, '.title')[0]
}
open() {
this.label.innerHTML = this.name
this.modal.open()
resize.check(this.rgb.container)
this.opened = 1

View file

@ -13,6 +13,7 @@ $font-menu: sans-serif;
--color-background: #21252b;
--color-ui-background: #2c313a;
--color-ui-button: #{$nord1};
--color-accent: #6db5fd;
--color-text: #{$nord4};

View file

@ -3,5 +3,6 @@
:root {
--color-background: #{$nord0};
--color-ui-background: #{$nord1};
--color-ui-button: #{$nord3};
--color-accent: #{$nord8};
}

View file

@ -1,11 +1,13 @@
.btn {
background: var(--color-background);
display: block;
padding:15rem;
padding: 0 15rem;
border-radius: 2rem;
position: relative;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
cursor: pointer;
&.disabled {
pointer-events: none;

View file

@ -11,8 +11,7 @@ $padding: 8rem;
flex-shrink: 0;
line-height: 40rem;
padding-left: $padding;
background: var(--color-background);
margin-bottom: 2rem;
background: var(--color-ui-button);
}
.file-list {
@ -20,6 +19,7 @@ $padding: 8rem;
flex:1;
background: var(--color-background);
padding: 0 $padding;
margin: 1rem 0;
}
.file {
position: relative;
@ -62,31 +62,31 @@ $padding: 8rem;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: flex-end;
height: 40rem;
justify-content: stretch;
height: 42rem + $padding * 2;
line-height: 38rem;
flex-shrink: 0;
margin-top: $padding;
div {
margin-left: $padding;
border: $padding solid var(--color-ui-background);
padding: 1rem;
.btn, input {
margin: 1rem;;
text-overflow: clip;
min-width: 0;
background: var(--color-ui-button);
}
i {
pointer-events: none;
}
.save-as {
flex:1;
height: 40rem;
line-height: 40rem;
border: 0;
padding: 0 10rem;
font-size: 120%;
top: -1rem;
position: relative;
background: var(--color-background);
min-width: 0;
&[disabled] {
display: none
visibility: hidden;
}
}
}

View file

@ -77,7 +77,6 @@ osc-inspector-field {
osc-inspector-category {
--alpha-fill: 0.5;
margin-top: 1rem;
display: block;
padding: 0 8rem;
@ -90,7 +89,6 @@ osc-inspector-category {
position: relative;
text-transform: none;
cursor: pointer;
// color: var(--color-ui-background);
height: $header-height;
line-height: $header-height;
// padding: 0 8rem;
@ -104,7 +102,7 @@ osc-inspector-category {
&:before {
position: relative;
font-family: FontAwesome;
content: "\f078";
content: "\f054";
width: $field-height;
text-align: left;
display: inline-block;
@ -115,16 +113,22 @@ osc-inspector-category {
}
&:not(.expanded) {
osc-inspector-field {
display: none;
}
--alpha-fill: 1;
--color-fill: var(--color-ui-button);
--alpha-fill: 0.10;
margin-bottom: 0;
&.expanded {
// --alpha-fill: 1;
--alpha-fill: 0.5;
--color-fill: var(--color-widget);
.category-header:before {
content: "\f054";
content: "\f078";
}
osc-inspector-field {
display: none;
display: flex;
}
}
@ -140,10 +144,9 @@ osc-inspector-category {
osc-inspector-checkbox {
--widget-padding: 0;
--color-fill: var(--color-ui-background);
--color-fill: var(--color-ui-button);
--alpha-fill: 1;
line-height: $field-height;
height: $field-height;
width: $field-height;
@ -267,19 +270,26 @@ osc-inspector-color {
.widget {
background: var(--color-background);
flex: 1;
width: 100%;
width: auto;
margin: 8rem;
}
.actions {
margin-top: 8rem;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: stretch;
height: 42rem + $padding * 2;
line-height: 38rem;
flex-shrink: 0;
border: $padding solid var(--color-ui-background);
padding: 1rem;
.btn {
flex: 1;
text-align: center;
}
:first-child {
margin-right: 8rem;
margin: 1rem;;
text-overflow: clip;
min-width: 0;
background: var(--color-ui-button);
}
}

View file

@ -76,7 +76,7 @@ $padding: 8rem;
}
}
.popup-wrapper {
background: var(--color-ui-background);
background: var(--color-background);
display: flex;
flex-direction: column;
align-items: stretch;
@ -92,7 +92,7 @@ $padding: 8rem;
.popup-content {
flex:1;
width: auto;
padding: 2rem $padding $padding;
// padding: 2rem $padding $padding;
min-height: 0;
display: flex;
}