Make self-update button red

This commit is contained in:
IQuant 2024-09-19 18:10:57 +03:00
parent 3847492f56
commit 5aafe485d2
3 changed files with 10 additions and 10 deletions

View file

@ -1993,7 +1993,7 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
[[package]]
name = "noita-proxy"
version = "0.24.1"
version = "0.24.2"
dependencies = [
"argh",
"bincode",

View file

@ -5,7 +5,7 @@ resolver = "2"
[package]
name = "noita-proxy"
description = "Noita Entangled Worlds companion app."
version = "0.24.1"
version = "0.24.2"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -5,7 +5,7 @@ use std::{
path::{Path, PathBuf},
};
use eframe::egui::{Align, Layout, Ui};
use eframe::egui::{Align, Button, Color32, Layout, Ui};
use poll_promise::Promise;
use reqwest::blocking::Client;
use tracing::info;
@ -73,13 +73,13 @@ impl SelfUpdateManager {
ui.label(tr("version_latest"));
}
Some(&Some(VersionCheckResult { newest, ord: _ })) => {
if ui
.small_button(tr_a(
let button = Button::new(tr_a(
"version_new_available",
&[("new_version", newest.to_string().into())],
))
.clicked()
{
.small()
.fill(Color32::RED);
if ui.add(button).clicked() {
self.request_update = true;
}
}