TIM-Tool: Fix scroll bug when centering #25

Merged
jaby merged 3 commits from topic/jb/tim-tool_fix-scroll-issue into main 2025-04-08 18:22:39 +00:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 32da34cad6 - Show all commits

View File

@ -81,6 +81,7 @@ 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

@ -29,8 +29,9 @@ export component MainTab inherits Rectangle {
callback remove_file_clicked(int);
callback move_vram_image(int, int, int);
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
forward-focus: key_focus;
group := GroupBox {
title: "VRAM Layout";
@ -293,7 +294,7 @@ export component MainTab inherits Rectangle {
}
}
FocusScope {
key_focus := FocusScope {
key-pressed(event) => {
if(vram_files_list.current-item != -1) {
if(event.text == Key.LeftArrow) {
@ -330,4 +331,8 @@ export component MainTab inherits Rectangle {
cur_sel_y.text = 0;
cur_sel_img.visible = false;
}
public function set_active() {
key_focus.focus();
}
}