gen res and more scaling options

This commit is contained in:
flick0
2024-01-10 16:03:19 +00:00
parent 911abac168
commit 7f8752da9b
6 changed files with 13 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ import {
} from "./imports.js";
import { arradd, arrremove, css, scss, assetsDir, dark, themedir,SCREEN_WIDTH} from "./util.js";
import { arradd, arrremove, css, scss, assetsDir, dark, themedir,SCREEN_WIDTH, SCREEN_HEIGHT} from "./util.js";
import { Workspaces } from "./widgets/workspace.js";
import { NierBorder } from "./widgets/nier_border.js";
import { button_pointer_size, top_icon_size, top_spacing, workspace_height, workspace_width } from "./scaling.js";
@@ -14,8 +14,11 @@ import { button_pointer_size, top_icon_size, top_spacing, workspace_height, work
const { exec, execAsync } = Utils;
const { Box, Window, Button, Icon, Scrollable } = Widget;
exec(`sassc ${scss} ${css}`);
Utils.writeFile(`$screen_width:${SCREEN_WIDTH}px;$screen_height:${SCREEN_HEIGHT}px;`,`${App.configDir}/style/data.scss`).then(() => {
print("wrote ",`${App.configDir}/style/data.scss`,`$screen_width:${SCREEN_WIDTH}px;$screen_height:${SCREEN_HEIGHT}px;`)
exec(`sassc ${scss} ${css}`);
}).catch(print);
const WHICH = "nier";
globalThis.WHICH = WHICH;

View File

@@ -1,7 +1,10 @@
import { SCREEN_WIDTH } from "./util.js";
export const scale = 1;
;
export const settings_title_top = 120*scale;
export const settings_title_bottom = 50*scale;
export const workspace_workspaces = 10;
export const top_spacing = 20*scale;

View File

@@ -1,2 +1 @@
$screen_width: 2560px;
$screen_height: 1600px;
$screen_width:2560px;$screen_height:1600px;

View File

@@ -799,20 +799,14 @@
.nier-settings-1-container .heading {
font-size: 70px;
margin-top: 130px;
margin-bottom: 50px;
padding-left: 35px; }
.nier-settings-2-container .heading {
font-size: 70px;
margin-top: 130px;
margin-bottom: 50px;
padding-left: 35px; }
.nier-settings-3-container .heading {
font-size: 50px;
margin-top: 150px;
margin-bottom: 50px;
padding-left: 35px; }
.nier-settings-1-container,

View File

@@ -58,22 +58,16 @@
.nier-settings-1-container .heading {
font-size: 70px;
margin-top: 130px;
margin-bottom: 50px;
padding-left: 35px;
}
.nier-settings-2-container .heading {
font-size: 70px;
margin-top: 130px;
margin-bottom: 50px;
padding-left: 35px;
}
.nier-settings-3-container .heading {
font-size: 50px;
margin-top: 150px;
margin-bottom: 50px;
padding-left: 35px;
}

View File

@@ -1,5 +1,6 @@
import { Widget, App, Utils } from "../../imports.js";
import { NierButtonGroup, NierButton } from "../../nier/buttons.js";
import { settings_title_bottom, settings_title_top } from "../../scaling.js";
import { SCREEN_WIDTH, SCREEN_HEIGHT, arradd, arrremove, get_cursor, css} from "../../util.js";
import { BluetoothGroup } from "../../widgets/bluetooth_group.js";
import { Info } from "../../widgets/info.js";
@@ -229,6 +230,7 @@ const NierSettingPane = (
Label({
hpack: "start",
label: "SYSTEM",
css:`margin-top: ${settings_title_top}px;margin-bottom: ${settings_title_bottom}px;`,
classNames: ["heading"],
}),
NierButton({
@@ -265,6 +267,7 @@ const NierSettingPane = (
},
}),
Label({
css:`margin-top: ${settings_title_top}px;margin-bottom: ${settings_title_bottom}px;`,
hpack: "start",
label: "APPS",
classNames: ["heading"],