feat(client): update elements sizes

This commit is contained in:
2024-05-30 16:14:03 +03:00
parent 16a5adefad
commit d6af58875d
6 changed files with 30 additions and 101 deletions

59
.vscode/launch.json vendored
View File

@@ -1,59 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"args": [
"client:flash:test"
],
"name": "client:flash:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
},
{
"args": [
"client:linux:test"
],
"name": "client:linux:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
},
{
"args": [
"client:html5:test"
],
"name": "client:html5:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
},
{
"args": [
"client:android:test"
],
"name": "client:android:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
},
{
"args": [
"editor:flash:test"
],
"name": "editor:flash:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
},
{
"args": [
"server:cpp:test"
],
"name": "server:cpp:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"type": "node"
}
]
}

11
.vscode/settings.json vendored
View File

@@ -1,11 +0,0 @@
{
"haxe.executable": {
"path": "/home/shmyga/sdk/haxe/4.2.5/haxe",
"env": {
"HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std",
},
},
"haxe.configurations": [
["build/client/flash/haxe/debug.hxml"]
]
}

View File

@@ -24,7 +24,7 @@ class AppTheme extends Theme {
} }
public function new() { public function new() {
super({embed: true}, COLORS, {base: "4h"}); super({embed: true}, COLORS, {base: "2.7h", big: "4h", veryBig: "4.5h"});
} }
override private function reload():Void { override private function reload():Void {
@@ -78,9 +78,9 @@ class AppTheme extends Theme {
], ["text.box"])); ], ["text.box"]));
register(new Style("button.level", [ register(new Style("button.level", [
"font.size" => fontSize.veryBig, "font.size" => fontSize.big,
"geometry.width" => SizeValue.fromInt(64), "geometry.width" => SizeValue.fromString("12h"),
"geometry.height" => SizeValue.fromInt(64), "geometry.height" => SizeValue.fromString("12h"),
"geometry.padding" => Box.fromFloat(0), "geometry.padding" => Box.fromFloat(0),
], ["button"])); ], ["button"]));
@@ -108,13 +108,13 @@ class AppTheme extends Theme {
register(new Style("window.close", [ register(new Style("window.close", [
"skin" => function() return new ButtonSVGSkin(Assets.getText("resources/image/icon/window-close-solid.svg"), colors.light), "skin" => function() return new ButtonSVGSkin(Assets.getText("resources/image/icon/window-close-solid.svg"), colors.light),
"geometry.width" => SizeValue.fromInt(36), "geometry.width" => SizeValue.fromString("8h"),
"geometry.height" => SizeValue.fromInt(36), "geometry.height" => SizeValue.fromString("8h"),
])); ]));
register(new Style("icon.tank", [ register(new Style("icon.tank", [
"geometry.width" => SizeValue.fromInt(42), "geometry.width" => SizeValue.fromString("8h"),
"geometry.height" => SizeValue.fromInt(42), "geometry.height" => SizeValue.fromString("8h"),
"skin.fillType" => FillType.DEFAULT, "skin.fillType" => FillType.DEFAULT,
])); ]));
@@ -165,16 +165,14 @@ class AppTheme extends Theme {
} }
private function registerButton(name:String, resource:String, solid:Bool = false):Void { private function registerButton(name:String, resource:String, solid:Bool = false):Void {
var size = Device.isMobile() ? 64 : 42;
var smallSize = Device.isMobile() ? 42 : 32;
register(new Style('button.$name', [ register(new Style('button.$name', [
"geometry.width" => SizeValue.fromInt(size), "geometry.width" => SizeValue.fromString("8h"),
"geometry.height" => SizeValue.fromInt(size), "geometry.height" => SizeValue.fromString("8h"),
"skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid), "skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid),
])); ]));
register(new Style('button.$name.small', [ register(new Style('button.$name.small', [
"geometry.width" => SizeValue.fromInt(smallSize), "geometry.width" => SizeValue.fromString("5h"),
"geometry.height" => SizeValue.fromInt(smallSize), "geometry.height" => SizeValue.fromString("5h"),
"skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid), "skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid),
])); ]));
} }

View File

@@ -1,7 +1,7 @@
--- ---
style: button.menu style: button.menu
geometry.width: 200 geometry.width: 35h
geometry.height: 130 geometry.height: 20h
geometry.padding: 5 geometry.padding: 5
layout.hAlign: center layout.hAlign: center
layout.vAlign: middle layout.vAlign: middle
@@ -10,6 +10,7 @@ content.mouseChildren: false
views: views:
- id: label - id: label
$type: hw.view.form.LabelView $type: hw.view.form.LabelView
font.size: 22 font.size: 4h
- id: state - id: state
$type: hw.view.form.LabelView $type: hw.view.form.LabelView
font.size: 3.5h

View File

@@ -3,9 +3,9 @@ layout.margin: 5
views: views:
- id: action - id: action
$type: hw.view.form.LabelView $type: hw.view.form.LabelView
geometry.width: 180 geometry.width: "20w"
style: text.box style: text.box
- id: key - id: key
$type: hw.view.form.LabelView $type: hw.view.form.LabelView
geometry.width: 250 geometry.width: "25w"
style: text.box style: text.box

View File

@@ -11,7 +11,7 @@
"HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std" "HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std"
} }
}, },
"haxe.configurations": [["build/app/flash/haxe/debug.hxml"]], "haxe.configurations": [["build/client/flash/haxe/debug.hxml"]],
"haxe.displayServer": { "haxe.displayServer": {
"arguments": [ "arguments": [
//"-v" //"-v"
@@ -25,22 +25,22 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"args": ["app:flash:test"], "args": ["${input:task}"],
"name": "app:flash:test", "name": "${input:task}",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node"
},
{
"args": ["server:cpp:test"],
"name": "server:cpp:test",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"request": "launch", "request": "launch",
"skipFiles": ["<node_internals>/**"], "skipFiles": ["<node_internals>/**"],
"type": "node" "type": "node"
} }
], ],
"compounds": [] "compounds": [],
"inputs": [
{
"id": "task",
"description": "Please enter task name",
"options": ["client:flash:test", "server:cpp:test", "generate"],
"type": "pickString"
}
]
} }
} }