Fix steamdeck scaling issue in egui (#417)

This commit is contained in:
Philip Kristoffersen
2024-10-30 11:15:35 +01:00
committed by GitHub
parent 10caa7bee1
commit f41187a4c2
4 changed files with 11 additions and 5 deletions
Generated
+1 -1
View File
@@ -640,7 +640,7 @@ dependencies = [
[[package]]
name = "boilr"
version = "1.9.5"
version = "1.9.6"
dependencies = [
"base64 0.22.1",
"color-eyre",
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "boilr"
version = "1.9.5"
version = "1.9.6"
[dependencies]
base64 = "^0.22.1"
@@ -26,6 +26,14 @@ https://hughsie.github.io/oars/index.html
-->
<content_rating type="oars-1.1" />
<releases>
<release version="1.9.6" date="2024-10-30">
<description>
<ul>
<li>Update dependencies</li>
<li>Fix scaling issue on steam deck</li>
</ul>
</description>
</release>
<release version="1.9.4" date="2023-09-18">
<description>
<ul>
+1 -3
View File
@@ -175,6 +175,7 @@ fn create_games_to_sync(rt: &mut Runtime, platforms: &[Box<dyn GamesPlatform>])
impl App for MyEguiApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut Frame) {
ctx.set_pixels_per_point(1.0);
let frame = egui::Frame::default()
.stroke(Stroke::new(0., BACKGROUND_COLOR))
.fill(BACKGROUND_COLOR);
@@ -301,9 +302,6 @@ fn create_style(style: &mut egui::Style) {
style.visuals.selection.bg_fill = PURLPLE;
}
fn setup(ctx: &egui::Context) {
#[cfg(target_family = "unix")]
ctx.set_pixels_per_point(0.999);
let mut style: egui::Style = (*ctx.style()).clone();
create_style(&mut style);
ctx.set_style(style);