fix fields/cards font size & too-large toolbar on high DPI Windows

- enable default_css on editor again, so that the html element
is set to the system font size. If this is bringing in unwanted styling,
maybe we can come up with a different solution that just adjusts the
fonts
- make toolbar size relative to html font size, instead of hard-coding
it
This commit is contained in:
Damien Elmes 2021-05-20 13:15:17 +10:00
parent 5d21383e88
commit d5f4860f9b
3 changed files with 4 additions and 4 deletions

View file

@ -139,7 +139,7 @@ class Editor:
"js/editor.js",
],
context=self,
default_css=False,
default_css=True,
)
lefttopbtns: List[str] = []

View file

@ -31,7 +31,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</script>
<StickyBar>
<WithTheming style="--toolbar-size: 35px; --toolbar-wrap: nowrap">
<WithTheming style="--toolbar-size: 2.3rem; --toolbar-wrap: nowrap">
<ButtonToolbar class="justify-content-between">
<ButtonToolbarItem>
<ButtonGroup class="flex-grow-1">

View file

@ -48,10 +48,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export const colorButtons = {};
export const templateButtons = {};
export let size: number = 30;
export let size: number = 2;
export let wraps: boolean = true;
$: style = `--toolbar-size: ${size}px; --toolbar-wrap: ${
$: style = `--toolbar-size: ${size}rem; --toolbar-wrap: ${
wraps ? "wrap" : "nowrap"
}`;
</script>