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() {
|
||||
tab_widget.current-index = 1;
|
||||
main_tab.set_active();
|
||||
}
|
||||
|
||||
public function clear_file_tab-current_selected_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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue