Compare commits

..

No commits in common. "b0b8c43700c884b3e255fcaf22057541e0a6c2a0" and "a8ca3bf8592b4efbca87145ccb5ff0f10d2703b0" have entirely different histories.

4 changed files with 6 additions and 37 deletions

View File

@ -4115,7 +4115,7 @@ dependencies = [
[[package]]
name = "tim_tool"
version = "1.0.0"
version = "0.1.0"
dependencies = [
"pathdiff",
"png",

View File

@ -1,6 +1,6 @@
[package]
name = "tim_tool"
version = "1.0.0"
version = "0.1.0"
edition = "2021"
[profile.release]

View File

@ -261,7 +261,7 @@ component ConvertImageWidget inherits Rectangle {
}
}
LineEdit {
text <=> root.image_name;
text: root.image_name;
}
}
HorizontalLayout {

View File

@ -90,8 +90,6 @@ export component MainTab inherits Rectangle {
if event.kind == PointerEventKind.down {
cur_sel_x.text = parent.img_x;
cur_sel_y.text = parent.img_y;
cur_sel_width.text = "Width: " + vram_data.images.image.width;
cur_sel_height.text = "Height: " + vram_data.images.image.height;
cur_sel_img.source = vram_data.images.full_image;
encoding_text.encoding_str = vram_data.info.encoding_str;
cur_sel_img.visible = true;
@ -141,7 +139,7 @@ export component MainTab inherits Rectangle {
}
slider := Slider {
minimum: 100.0;
maximum: 800.0;
maximum: 400.0;
step: 1.0;
value: 100.0;
@ -166,27 +164,10 @@ export component MainTab inherits Rectangle {
current-item-changed(current-item) => {
cur_sel_x.text = root.vram_data[current-item].info.x;
cur_sel_y.text = root.vram_data[current-item].info.y;
cur_sel_width.text = "Width: " + root.vram_data[current-item].images.image.width;
cur_sel_height.text = "Height: " + root.vram_data[current-item].images.image.height;
cur_sel_img.source = root.vram_data[current-item].images.full_image;
encoding_text.encoding_str = root.vram_data[current-item].info.encoding_str;
cur_sel_img.visible = true;
}
item-pointer-event(item, event, position) => {
if event.button == PointerEventButton.right && event.kind == PointerEventKind.down {
main_view.viewport-x = -(root.vram_data[item].info.x + (root.vram_data[item].info.x/64))*root.scale*1px + (main_view.width/4);
main_view.viewport-y = -(root.vram_data[item].info.y + (root.vram_data[item].info.y/256))*root.scale*1px + (main_view.height/4);
main_view.update_viewport();
}
}
}
HorizontalLayout {
padding: 4px;
alignment: center;
Text {
text: "Right click to focus element on screen";
}
}
HorizontalLayout {
padding: 4px;
@ -230,7 +211,7 @@ export component MainTab inherits Rectangle {
cur_sel_x := LineEdit {
input-type: number;
text: 0;
width: 48pt;
width: 64pt;
accepted(text) => {
if(vram_files_list.current-item != -1) {
@ -239,12 +220,6 @@ export component MainTab inherits Rectangle {
}
}
}
VerticalLayout {
alignment: center;
cur_sel_width := Text {
text: "Width: 0";
}
}
}
HorizontalLayout {
alignment: start;
@ -257,7 +232,7 @@ export component MainTab inherits Rectangle {
cur_sel_y := LineEdit {
input-type: number;
text: 0;
width: 48pt;
width: 64pt;
accepted(text) => {
if(vram_files_list.current-item != -1) {
@ -266,12 +241,6 @@ export component MainTab inherits Rectangle {
}
}
}
VerticalLayout {
alignment: center;
cur_sel_height := Text {
text: "Height: 0";
}
}
}
encoding_text := Text {
in-out property <string> encoding_str;