diff --git a/CHANGELOG.md b/CHANGELOG.md index ffb8797..026dd0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -125,6 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 drawing them. By making this change, the bars now have input priority over the contents. This means that the scroll bars are now clickable even in areas where interactive widgets are beneath them. +- `GraphicsContext::fill` now properly fills the entire region of the widget. ### Added diff --git a/src/context.rs b/src/context.rs index 30b06de..d727299 100644 --- a/src/context.rs +++ b/src/context.rs @@ -3,7 +3,7 @@ use std::borrow::Cow; use std::ops::{Deref, DerefMut}; use figures::units::{Lp, Px, UPx}; -use figures::{IntoSigned, Point, Px2D, Rect, Round, ScreenScale, Size, Zero}; +use figures::{IntoSigned, Point, Rect, Round, ScreenScale, Size, Zero}; use kludgine::app::winit::event::{Ime, MouseButton, MouseScrollDelta, TouchPhase}; use kludgine::app::winit::window::Cursor; use kludgine::cosmic_text::FamilyOwned; @@ -626,7 +626,7 @@ impl<'context, 'clip, 'gfx, 'pass> GraphicsContext<'context, 'clip, 'gfx, 'pass> /// If the alpha channel of `color` is 0, this function does nothing. pub fn fill(&mut self, color: Color) { if color.alpha() > 0 { - let visible_rect = Rect::from(self.gfx.region().size - Size::px(1, 1)); + let visible_rect = Rect::from(self.gfx.region().size); let radii = self.get(&CornerRadius); let radii = radii.map(|r| r.into_px(self.gfx.scale()));