summaryrefslogtreecommitdiffstats
path: root/native/src/widget/progress_bar.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:22:29 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:24:11 +0700
commit023aded2772f0cd6abd716fe5c8624d5d22e21fa (patch)
tree1bdb1a4584d7acc688b081a299bb4431cd35c349 /native/src/widget/progress_bar.rs
parent343f9b7e2e594bd1fef1ed511d71e81f9c44e3d9 (diff)
downloadiced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.gz
iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.bz2
iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.zip
Rename `fill_rectangle` to `fill_quad` in `Renderer`
Diffstat (limited to 'native/src/widget/progress_bar.rs')
-rw-r--r--native/src/widget/progress_bar.rs36
1 files changed, 20 insertions, 16 deletions
diff --git a/native/src/widget/progress_bar.rs b/native/src/widget/progress_bar.rs
index 1f83de10..69eb8c09 100644
--- a/native/src/widget/progress_bar.rs
+++ b/native/src/widget/progress_bar.rs
@@ -116,25 +116,29 @@ where
let style = self.style_sheet.style();
- renderer.fill_rectangle(renderer::Quad {
- bounds: Rectangle { ..bounds },
- background: style.background,
- border_radius: style.border_radius,
- border_width: 0.0,
- border_color: Color::TRANSPARENT,
- });
-
- if active_progress_width > 0.0 {
- renderer.fill_rectangle(renderer::Quad {
- bounds: Rectangle {
- width: active_progress_width,
- ..bounds
- },
- background: style.bar,
+ renderer.fill_quad(
+ renderer::Quad {
+ bounds: Rectangle { ..bounds },
border_radius: style.border_radius,
border_width: 0.0,
border_color: Color::TRANSPARENT,
- });
+ },
+ style.background,
+ );
+
+ if active_progress_width > 0.0 {
+ renderer.fill_quad(
+ renderer::Quad {
+ bounds: Rectangle {
+ width: active_progress_width,
+ ..bounds
+ },
+ border_radius: style.border_radius,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
+ },
+ style.bar,
+ );
}
}