Fix various focus issues
This commit is contained in:
parent
af633a4fdf
commit
32da34cad6
|
@ -81,6 +81,7 @@ export component MainWindow inherits Window {
|
||||||
|
|
||||||
public function change_to_main() {
|
public function change_to_main() {
|
||||||
tab_widget.current-index = 1;
|
tab_widget.current-index = 1;
|
||||||
|
main_tab.set_active();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clear_file_tab-current_selected_file() {
|
public function clear_file_tab-current_selected_file() {
|
||||||
|
|
|
@ -31,6 +31,7 @@ export component MainTab inherits Rectangle {
|
||||||
|
|
||||||
width: group.width + group.x*2;
|
width: group.width + group.x*2;
|
||||||
height: group.height + group.y*2 + 32px;
|
height: group.height + group.y*2 + 32px;
|
||||||
|
forward-focus: key_focus;
|
||||||
|
|
||||||
group := GroupBox {
|
group := GroupBox {
|
||||||
title: "VRAM Layout";
|
title: "VRAM Layout";
|
||||||
|
@ -293,7 +294,7 @@ export component MainTab inherits Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FocusScope {
|
key_focus := FocusScope {
|
||||||
key-pressed(event) => {
|
key-pressed(event) => {
|
||||||
if(vram_files_list.current-item != -1) {
|
if(vram_files_list.current-item != -1) {
|
||||||
if(event.text == Key.LeftArrow) {
|
if(event.text == Key.LeftArrow) {
|
||||||
|
@ -330,4 +331,8 @@ export component MainTab inherits Rectangle {
|
||||||
cur_sel_y.text = 0;
|
cur_sel_y.text = 0;
|
||||||
cur_sel_img.visible = false;
|
cur_sel_img.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function set_active() {
|
||||||
|
key_focus.focus();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue