Commit 7da2bbb2037d
tarball1 file changed+8-6
@@ -91,7 +91,8 @@ impl Cursor {
9191
}9292
9393
/// The theme's image nearest the cursor size times `scale`, stretched to94
- /// exactly that size so it covers whole pixels at any scale.94
+ /// exactly that size so it covers whole pixels. At scale 1 it is drawn95
+ /// as the theme has it.9596
fn sized(9697
&mut self,9798
renderer: &mut VulkanRenderer,@@ -105,11 +106,12 @@ impl Cursor {
105106
.file(icon)106107
.and_then(|images| images.iter().min_by_key(|i| i.size.abs_diff(wanted)))107108
.and_then(|image| {108
- prepare(109
- renderer,110
- image,111
- f64::from(wanted) / f64::from(image.size.max(1)),112
- )109
+ let ratio = if scale == 1.0 {110
+ 1.0111
+ } else {112
+ f64::from(wanted) / f64::from(image.size.max(1))113
+ };114
+ prepare(renderer, image, ratio)113115
});114116
self.sized.insert(key, prepared);115117
}