Remove the in-app close button; the window manager provides window controls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
80672b343d
commit
ff1a939ef3
6 changed files with 4 additions and 24 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
All notable changes are listed here. Versions follow [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Removed the in-app ✕ (close) button: the window manager or desktop provides window controls.
|
||||
|
||||
## [0.3.0] — 2026-10-18
|
||||
|
||||
- Open ChessBase databases (`.cbh` with companion files) and ChessBase archives (`.cbv`), and
|
||||
|
|
|
|||
|
|
@ -580,7 +580,6 @@ impl eframe::App for App {
|
|||
self.settings_ui.open = true;
|
||||
self.settings_ui.tab = Tab::Engines;
|
||||
}
|
||||
GameAction::Quit => ctx.send_viewport_cmd(egui::ViewportCommand::Close),
|
||||
GameAction::OpenSettings => self.settings_ui.open = !self.settings_ui.open,
|
||||
GameAction::Toast(m) => self.toast(&ctx, m),
|
||||
GameAction::PauseLive => {
|
||||
|
|
@ -614,7 +613,6 @@ impl eframe::App for App {
|
|||
self.settings_dirty = true;
|
||||
}
|
||||
LibraryAction::OpenSettings => self.settings_ui.open = true,
|
||||
LibraryAction::Quit => ctx.send_viewport_cmd(egui::ViewportCommand::Close),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ pub enum GameAction {
|
|||
EngineSwitch,
|
||||
OpenEngineSettings,
|
||||
OpenSettings,
|
||||
Quit,
|
||||
Toast(String),
|
||||
/// A whole-game analysis started: pause the live engine (they would share the CPU).
|
||||
PauseLive,
|
||||
|
|
@ -377,9 +376,6 @@ impl GameView {
|
|||
}
|
||||
});
|
||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
||||
if crate::widgets::close_button(ui).clicked() {
|
||||
actions.push(GameAction::Quit);
|
||||
}
|
||||
if ui
|
||||
.button(tr("⚙ Settings"))
|
||||
.on_hover_text("Ctrl+,")
|
||||
|
|
|
|||
|
|
@ -131,14 +131,6 @@ const ROWS: &[[&str; 6]] = &[
|
|||
"Piramidi rosa",
|
||||
],
|
||||
// --- common / window ---
|
||||
[
|
||||
"Close the application",
|
||||
"Закрыть программу",
|
||||
"Fermer l'application",
|
||||
"Programm schließen",
|
||||
"Cerrar la aplicación",
|
||||
"Chiudi l'applicazione",
|
||||
],
|
||||
[
|
||||
"Cancel",
|
||||
"Отмена",
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ pub enum LibraryAction {
|
|||
AddDatabases,
|
||||
RemoveDatabase(PathBuf),
|
||||
OpenSettings,
|
||||
Quit,
|
||||
}
|
||||
|
||||
/// How a database was imported, and what is worth knowing about it.
|
||||
|
|
@ -255,9 +254,6 @@ impl Library {
|
|||
ui.horizontal(|ui| {
|
||||
ui.heading(tr("Databases"));
|
||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
||||
if crate::widgets::close_button(ui).clicked() {
|
||||
actions.push(LibraryAction::Quit);
|
||||
}
|
||||
if ui.button(tr("⚙ Settings")).clicked() {
|
||||
actions.push(LibraryAction::OpenSettings);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
//! Small shared widgets.
|
||||
|
||||
use crate::i18n::tr;
|
||||
use egui::{Color32, Sense, Stroke, Ui, vec2};
|
||||
|
||||
/// Window close button (the app runs undecorated under tiling compositors).
|
||||
pub fn close_button(ui: &mut Ui) -> egui::Response {
|
||||
x_button(ui, vec2(32.0, 28.0), 6.0).on_hover_text(tr("Close the application"))
|
||||
}
|
||||
|
||||
/// Compact ✕ (e.g. to cancel a running task); the caller adds the tooltip.
|
||||
pub fn small_close_button(ui: &mut Ui) -> egui::Response {
|
||||
x_button(ui, vec2(22.0, 20.0), 4.5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue