Skip to content

Commit a00b35e

Browse files
committed
cleanup control ui, separate into groups
1 parent 1a0510f commit a00b35e

File tree

4 files changed

+227
-132
lines changed

4 files changed

+227
-132
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414

1515
/target
1616
/public
17+
.ionide

crates/notation_bevy/src/app/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn handle_keyboard_inputs(
163163
mut window_resized_evts: EventWriter<WindowResizedEvent>,
164164
viewer_query: Query<(Entity, &Arc<NotationViewer>), With<Arc<NotationViewer>>>,
165165
) {
166-
if keyboard_input.just_released(KeyCode::Tab) {
166+
if keyboard_input.just_released(KeyCode::LControl) {
167167
state.hide_control = !state.hide_control;
168168
if !ControlView::HUD_MODE {
169169
window_resized_evts.send(WindowResizedEvent());

crates/notation_bevy/src/tab/tab_plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn on_mouse_clicked(
8888
}
8989
if let Some(pos) = pos {
9090
if !app_state.hide_control {
91-
if app_state.window_width / 2.0 - pos.x > ControlView::WIDTH {
91+
if app_state.window_width / 2.0 - pos.x > ControlView::calc_width(app_state.window_width) {
9292
app_state.hide_control = true;
9393
}
9494
} else {

0 commit comments

Comments
 (0)