textual-paint/paint.css

248 lines
4.5 KiB
CSS
Raw Normal View History

2023-04-10 23:51:53 +03:00
Screen {
2023-04-15 06:31:05 +03:00
layers: window menu-popup;
2023-04-10 23:51:53 +03:00
}
2023-04-11 01:06:41 +03:00
#paint {
layout: grid;
grid-size: 1;
grid-columns: 1fr;
grid-rows: 1fr 0;
2023-04-11 06:25:32 +03:00
}
#main-horizontal-split {
2023-04-10 23:51:53 +03:00
layout: grid;
2023-04-11 00:45:54 +03:00
grid-size: 2;
2023-04-11 18:40:47 +03:00
grid-columns: 0 1fr;
grid-rows: 1fr;
margin: 0 0;
2023-04-10 23:51:53 +03:00
}
2023-04-11 18:40:47 +03:00
.show_tools_box #main-horizontal-split {
grid-columns: 15 1fr;
2023-04-11 18:40:47 +03:00
}
.show_colors_box #paint {
grid-rows: 1fr 6;
}
2023-04-11 15:47:47 +03:00
#editing-area {
background: rgb(128, 128, 128);
2023-04-11 15:47:47 +03:00
}
.-dark-mode #editing-area {
background: $surface-lighten-2;
}
2023-04-11 15:47:47 +03:00
2023-04-11 15:46:57 +03:00
#canvas {
width: auto;
height: auto;
2023-04-11 15:47:47 +03:00
margin: 1 2;
2023-04-11 15:46:57 +03:00
}
#tools_box {
layout: grid;
grid-size: 2;
grid-gutter: 0 1;
grid-columns: 6;
grid-rows: 3;
padding: 0 1;
height: 100%;
/* can't have a border without taking up a whole cell, and it's more important to show as much of the tools as possible */
/* border-bottom: tall $panel-darken-2; */
background: $panel-darken-1;
overflow: hidden;
}
2023-04-14 01:18:27 +03:00
#tools_box Button {
text-style: none !important;
}
#tools_box Button:focus {
/* disable focus highlight */
/* in the future it may be important to prevent focus instead */
text-style: none;
}
#tools_box Button.selected {
2023-04-11 04:04:08 +03:00
background: $panel-lighten-3;
border-bottom: tall $panel-lighten-2;
border-top: tall $panel-darken-2;
}
2023-04-11 06:25:32 +03:00
#colors_box {
2023-04-11 06:56:47 +03:00
layout: grid;
grid-size: 2;
grid-columns: 10 1fr;
border-top: tall $panel-lighten-2;
background: $panel-darken-1;
2023-04-11 06:56:47 +03:00
}
.color_well {
border-top: tall $panel-darken-2;
border-bottom: tall $panel-lighten-3;
}
2023-04-11 06:56:47 +03:00
#selected_colors {
max-height: 5;
overflow: hidden;
}
#selected_color {
2023-04-12 22:25:20 +03:00
width: 8;
2023-04-11 06:56:47 +03:00
height: 4;
margin-left: 1;
}
#available_colors {
2023-04-11 06:25:32 +03:00
layout: grid;
grid-size: 14;
grid-gutter: 0 1;
grid-columns: 4;
2023-04-11 06:25:32 +03:00
grid-rows: 2;
height: auto;
width: auto;
overflow: hidden;
2023-04-11 06:25:32 +03:00
}
2023-04-10 23:51:53 +03:00
Button {
width: 100%;
height: 100%;
}
2023-04-13 03:49:16 +03:00
2023-04-13 05:07:38 +03:00
.menu {
2023-04-13 05:42:48 +03:00
background: $panel;
/* border: round red; */
}
.menu_popup {
2023-04-13 05:07:38 +03:00
layout: vertical;
2023-04-13 05:42:48 +03:00
dock: top;
2023-04-15 06:24:51 +03:00
layer: menu-popup;
2023-04-13 05:07:38 +03:00
width: auto;
height: auto;
overflow-y: auto;
/* calc isn't supported, and this should be determined by the y position anyways, which is set in python */
/* max-height: calc(100vh - 3); */
max-height: 90vh;
/* width: auto doesn't account for the scrollbar... */
/* This cuts off a character, but it's not as ugly as having a horizontal scrollbar */
overflow-x: hidden;
2023-04-13 05:07:38 +03:00
}
2023-04-13 03:49:16 +03:00
/* MenuBar { */
.menu_bar {
layout: horizontal;
2023-04-13 05:07:38 +03:00
width: 100%;
2023-04-13 03:49:16 +03:00
height: auto;
dock: top;
/* border-bottom: hkey $panel-darken-2; */
overflow: hidden;
2023-04-13 03:49:16 +03:00
}
/* MenuItem { */
.menu_item {
width: auto;
height: auto;
}
/* Separator { */
.separator {
width: 100%;
height: 1;
}
2023-04-13 03:49:16 +03:00
.menu Button {
border: none;
height: 3;
2023-04-16 04:16:18 +03:00
}
.menu_bar Button {
2023-04-17 03:33:29 +03:00
width: auto;
min-width: 0;
2023-04-15 06:31:05 +03:00
}
2023-04-16 04:16:18 +03:00
.menu_popup Button {
min-width: 20;
text-align: left;
}
2023-04-15 06:31:05 +03:00
.window {
dock: top;
layer: window;
background: $surface;
border: outer $panel-darken-2;
layout: vertical;
align: center middle;
width: auto;
height: auto;
}
.window_title_bar {
layout: horizontal;
width: 100%;
height: auto;
background: $accent;
color: auto;
text-style: bold;
}
.window_title_bar Button {
max-width: 6;
height: 3;
2023-04-15 06:31:05 +03:00
}
.window_title {
width: 1fr;
height: 100%;
content-align: left middle;
padding-left: 1;
}
.window_content {
layout: vertical;
overflow: auto;
max-height: 60vh;
max-width: 80vw;
width: auto;
height: auto;
background: $background;
}
.dialog .window_content {
background: $surface;
}
2023-04-16 04:11:44 +03:00
#save_as_dialog .window_content,
#open_dialog .window_content {
2023-04-15 06:31:05 +03:00
padding: 2 4;
2023-04-15 08:25:31 +03:00
width: 80;
height: 30;
2023-04-15 06:31:05 +03:00
}
2023-04-16 04:11:44 +03:00
#save_as_dialog .window_content Input,
#open_dialog .window_content Input {
2023-04-15 06:31:05 +03:00
width: 100%;
margin-bottom: 1;
}
2023-04-16 04:11:44 +03:00
#save_as_dialog .window_content DirectoryTree,
#open_dialog .window_content DirectoryTree {
2023-04-15 08:25:31 +03:00
height: 15;
margin-bottom: 1;
}
2023-04-16 04:11:44 +03:00
#save_as_dialog .window_content Button,
#open_dialog .window_content Button {
2023-04-15 06:31:05 +03:00
width: auto;
height: auto;
}
#message_box .window_content {
width: 50;
height: auto;
}
#message_box .window_content Button {
width: auto;
min-width: 10;
height: auto;
margin-right: 1;
margin-top: 1;
}
#message_box .warning_icon {
width: auto;
height: auto;
padding-left: 2;
}
#message_box .main_content {
padding: 1 2;
width: 1fr;
height: auto;
}
#message_box .window_content Horizontal {
height: auto;
}