fixed tab title to be fully clickable

This commit is contained in:
WanderingPenwing 2024-07-22 15:46:02 +02:00
parent 297f53198f
commit 34dfaed030
3 changed files with 5 additions and 5 deletions

2
Cargo.lock generated
View file

@ -565,7 +565,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "calcifer"
version = "1.3.2"
version = "1.4.0"
dependencies = [
"arboard",
"eframe",

View file

@ -1 +1 @@
{"categories":[{"name":"to do","content":[{"name":"bug project","description":"when switching tabs between two project file, if item window is open it crashes","id":1},{"name":"update workflow .yml","description":"make a workflow compiling the calcifer and put the linux in calcifer-{version}\nand the windows in calcifer_windows_{version}\n\nupdate nix\nupdate jiji","id":5},{"name":"fix tab title","description":"// Hello there","id":2}]},{"name":"in progress","content":[{"name":"export copy paste fix","description":"// Hello there","id":1}]},{"name":"done","content":[{"name":"move .project file","description":"// Hello there","id":4},{"name":"move config","description":"config from .calcifer/save.json\nto .config/calcifer/state.json","id":1},{"name":"add id to textarea per tab","description":"to improve undo, make each code area of each tab have a unique id (no more undo into another tab)","id":1},{"name":"file tree id ?","description":"// Hello there","id":1},{"name":"open dir in tree ?","description":"// Hello there","id":2}]},{"name":"+","content":[]}]}
{"categories":[{"name":"to do","content":[{"name":"bug project","description":"when switching tabs between two project file, if item window is open it crashes","id":1},{"name":"update workflow .yml","description":"make a workflow compiling the calcifer and put the linux in calcifer-{version}\nand the windows in calcifer_windows_{version}\n\nupdate nix\nupdate jiji","id":5}]},{"name":"in progress","content":[{"name":"export copy paste fix","description":"// Hello there","id":1}]},{"name":"done","content":[{"name":"move .project file","description":"// Hello there","id":4},{"name":"move config","description":"config from .calcifer/save.json\nto .config/calcifer/state.json","id":1},{"name":"add id to textarea per tab","description":"to improve undo, make each code area of each tab have a unique id (no more undo into another tab)","id":1},{"name":"file tree id ?","description":"// Hello there","id":1},{"name":"open dir in tree ?","description":"// Hello there","id":2},{"name":"fix tab title","description":"// Hello there","id":2}]},{"name":"+","content":[]}]}

View file

@ -243,8 +243,7 @@ impl Calcifer {
ui.with_layout(
egui::Layout::left_to_right(egui::Align::TOP),
|ui| {
if ui
.add(
if ui.add(
egui::Label::new(
egui::RichText::new(format!(
" {}{}",
@ -256,7 +255,8 @@ impl Calcifer {
.truncate(true)
.sense(egui::Sense::click()),
)
.clicked()
.clicked() ||
ui.add_sized(ui.available_size(), egui::Label::new("").sense(egui::Sense::click())).clicked()
{
self.selected_tab = index;
}