Dialogs: the Select chip keeps its size on hover (#1387)

New frame::add_outlined adds a button that draws its own outline with the theme's outline width set to the same width in every state, so its padding no longer drops a pixel on hover. Used by the dialogs' Select chip, Sketch Text's Path chip and the bug report's Open GitHub draft button. New dialog_chip_hover test. Fixes the second point of #1335.
This commit is contained in:
DuBearte authored and GitHub committed 2026-10-15 13:01:09 -04:00
1 parent e382a77350
commit fd422a3fc1
5 files changed
+45 -9

No files matched your search

+8 -7
View File
@@ -598,13 +598,14 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
ui.add(egui::Label::new(crate::i18n::tr_label("3. Click Submit new issue on GitHub to send your report.")).wrap());
ui.horizontal_wrapped(|ui| {
let t = crate::theme::Tokens::get();
if ui
.add(
egui::Button::new(RichText::new(crate::i18n::tr_label("Open GitHub draft")).strong().color(t.text))
.fill(t.accent_soft)
.stroke(egui::Stroke::new(1.0, t.accent)),
)
.clicked()
if crate::frame::add_outlined(
ui,
egui::Button::new(RichText::new(crate::i18n::tr_label("Open GitHub draft")).strong().color(t.text))
.fill(t.accent_soft)
.stroke(egui::Stroke::new(1.0, t.accent)),
1.0,
)
.clicked()
{
if copy_needed {
ctx.copy_text(draft.body.clone());