Compare commits

..

No commits in common. "a1fa0aace2c9a42df58e15624e0f6a0050062258" and "5cccf3ace99c1118e1a17086a6e1c9e73f4ca900" have entirely different histories.

4 changed files with 379 additions and 1307 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,15 +9,15 @@ panic = "abort"
[dependencies]
pathdiff = "0.2.3"
png = "0.17.16"
rfd = "0.15.3"
slint = "1.10.0"
serde = {version = "1.0.219", features = ["derive"]}
rfd = "0.15.2"
slint = "1.9.2"
serde = {version = "1.0.140", features = ["derive"]}
serde_json = "1.0"
tiny-skia = "0.11.4"
tool_helper = {path = "../tool_helper"}
[build-dependencies]
slint-build = "1.10.0"
slint-build = "1.9.2"
[package.metadata.bundle]
name = "TIMTOOL"

View File

@ -81,7 +81,6 @@ export component MainWindow inherits Window {
public function change_to_main() {
tab_widget.current-index = 1;
main_tab.set_active();
}
public function clear_file_tab-current_selected_file() {

View File

@ -33,7 +33,6 @@ export component MainTab inherits Rectangle {
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
forward-focus: key_focus;
group := GroupBox {
title: "VRAM Layout";
@ -132,20 +131,10 @@ export component MainTab inherits Rectangle {
}
function update_viewport() {
// If this value is positive, then the image moved so much to the right, that we do not use the full display area anymore
if self.viewport-x > 0 {
self.viewport-x = 0;
}
if abs(self.viewport-x) + self.width > self.viewport-width {
self.viewport-x += (self.width + abs(self.viewport-x)) - self.viewport-width;
}
if self.viewport-y > 0 {
self.viewport-y = 0;
}
// If this value is positive, then the image moved so much down, that we do not use the full display area anymore
if abs(self.viewport-y) + self.height > self.viewport-height {
self.viewport-y += (self.height + abs(self.viewport-y)) - self.viewport-height;
}
@ -360,7 +349,7 @@ export component MainTab inherits Rectangle {
}
}
key_focus := FocusScope {
FocusScope {
key-pressed(event) => {
if(vram_files_list.current-item != -1) {
if(event.text == Key.LeftArrow) {
@ -397,8 +386,4 @@ export component MainTab inherits Rectangle {
cur_sel_y.text = 0;
cur_sel_img.visible = false;
}
public function set_active() {
key_focus.focus();
}
}