Fill and Stroke chips show the dropdown arrow

This commit is contained in:
bflatastic
2026-11-24 15:00:14 +07:00
parent ac82f2911a
commit d3187adecf
+2 -2
View File
@@ -62,7 +62,7 @@ use craft::color_ui::ui::{PaintChip, PairWell, SwatchPair, SwatchPairOutput, Swa
use craft::keymap::CommandRef;
use craft::theme::Srgba;
use craft::theme::variant::Tone;
use craft::ui::buttons::IconButton;
use craft::ui::buttons::{IconButton, PopupMark};
use craft::ui::choice::SwatchSpacing;
use craft::ui::contract::{Bind, CommandSet as _, Entry, ListDrag, PopupKind, Props as _, Show as _, ShowContainer as _, Sizing, Trigger};
use craft::ui::display::{Divider, Shade, Text};
@@ -696,7 +696,7 @@ pub(crate) fn paint_chip(app: &mut VectorcraftApp, ui: &mut Ui, stroke: bool) {
};
let shown = if mixed { Mixed::Mixed } else { Mixed::Same(well_paint(&paint, &|_| None)) };
let fallback = srgba(&paint.color().unwrap_or(Color::BLACK));
let out = PaintChip::new(label, Bind::given(shown), fallback).popover(false).ring(stroke).tooltip(tip).show(ui);
let out = PaintChip::new(label, Bind::given(shown), fallback).popover(false).ring(stroke).popup_mark(PopupMark::Menu).tooltip(tip).show(ui);
let chip = out.edit.response.id;
if let Some(mods) = out.clicked {
app.run("paint.toggleActive", json!({ "fill": !stroke })).ok();