mirror of
https://github.com/danbulant/cushy
synced 2026-06-19 06:21:15 +00:00
MSAA + outlines are now inset
Inset outlines may not be the right approach, but it simplifies potential alignment issues caused by insetting all filled background drawing by half the width of the focus ring.
This commit is contained in:
parent
d5bde44e27
commit
9403e85901
3 changed files with 4 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -1089,7 +1089,7 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
|
|||
[[package]]
|
||||
name = "kludgine"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/khonsulabs/kludgine#0530299bbe79431b5fa398182991c63e06d94b90"
|
||||
source = "git+https://github.com/khonsulabs/kludgine#f286d7de3f37ec7430890f6eeeb5d98a1ff0314e"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"alot",
|
||||
|
|
|
|||
|
|
@ -546,10 +546,10 @@ impl<'context, 'window, 'clip, 'gfx, 'pass> GraphicsContext<'context, 'window, '
|
|||
{
|
||||
if color.alpha() > 0 {
|
||||
let options = options.colored(color).into_px(self.gfx.scale());
|
||||
let inset = options.line_width;
|
||||
let inset = options.line_width / 2;
|
||||
let visible_rect = Rect::new(
|
||||
Point::squared(inset),
|
||||
self.gfx.region().size - Point::new(inset * 2, inset * 2),
|
||||
self.gfx.region().size - Point::squared(inset),
|
||||
);
|
||||
|
||||
let radii = self.get(&CornerRadius);
|
||||
|
|
|
|||
|
|
@ -136,6 +136,6 @@ define_components! {
|
|||
OpaqueWidgetColor(Color, "opaque_color", .surface.opaque_widget)
|
||||
/// A set of radius descriptions for how much roundness to apply to the
|
||||
/// shapes of widgets.
|
||||
CornerRadius(CornerRadii<Dimension>, "corner_radius", CornerRadii::from(Dimension::Lp(Lp::points(100))))
|
||||
CornerRadius(CornerRadii<Dimension>, "corner_radius", CornerRadii::from(Dimension::Lp(Lp::points(7))))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue