mirror of https://github.com/wayvr-org/wayvr.git
fix light mode woes
This commit is contained in:
parent
e030a9b115
commit
720126bf57
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
|
|
@ -64,7 +64,6 @@ async fn request_supporters(tasks: Tasks<Task>) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
impl<T> TabDonate<T> {
|
||||
fn set_supporters(&mut self, layout: &mut Layout, supporters: cached_fetcher::Supporters) -> anyhow::Result<()> {
|
||||
let globals = layout.state.globals.clone();
|
||||
|
|
|
|||
|
|
@ -42,10 +42,14 @@ fn get_supporter_anim(
|
|||
let total_tickets: u32 = supporters.supporters.iter().map(|s| s.tickets()).sum();
|
||||
let jackpot = rand::random_range(0..total_tickets);
|
||||
let mut cumulative = 0u32;
|
||||
let random_supporter = supporters.supporters.iter().find(|s| {
|
||||
cumulative += s.tickets();
|
||||
cumulative >= jackpot
|
||||
}).unwrap();
|
||||
let random_supporter = supporters
|
||||
.supporters
|
||||
.iter()
|
||||
.find(|s| {
|
||||
cumulative += s.tickets();
|
||||
cumulative >= jackpot
|
||||
})
|
||||
.unwrap();
|
||||
let username = random_supporter.username.clone();
|
||||
if username != prev_supporter_name {
|
||||
break username;
|
||||
|
|
@ -66,7 +70,7 @@ fn get_supporter_anim(
|
|||
|
||||
btn.set_text_color(
|
||||
common,
|
||||
WguiColor::Named(WguiNamedColor::with_alpha(WguiColorName::OnPrimary, opacity)),
|
||||
WguiColor::Named(WguiNamedColor::with_alpha(WguiColorName::OnBackgroundVariant, opacity)),
|
||||
);
|
||||
|
||||
// first iter
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
|
|||
use crate::util::{networking::http_client, steam_utils::AppID};
|
||||
use anyhow::Context;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum::{AsRefStr};
|
||||
use strum::AsRefStr;
|
||||
use wlx_common::cache_dir;
|
||||
|
||||
fn get_unix_timestamp() -> u64 {
|
||||
|
|
@ -23,7 +23,7 @@ impl SupporterTier {
|
|||
pub fn pretty_str(self) -> String {
|
||||
format!("{self:?} Tier")
|
||||
}
|
||||
|
||||
|
||||
pub const fn color_str(self) -> &'static str {
|
||||
match self {
|
||||
Self::Platinum => "#aaffff",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use crate::{
|
||||
frontend::{FrontendTask, FrontendTasks},
|
||||
tab::TabType,
|
||||
util::popup_manager::{MountPopupOnceParams, PopupHolder},
|
||||
views::{ViewTrait, ViewUpdateParams},
|
||||
};
|
||||
|
|
@ -52,6 +53,8 @@ impl ViewTrait for View {
|
|||
globals.palette = new_palette;
|
||||
par.general_config.color_palette = profile.into();
|
||||
par.layout.tasks.push(LayoutTask::RefreshPalette);
|
||||
// this works because LookAndFeel is the first tab
|
||||
self.frontend_tasks.push(FrontendTask::SetTab(TabType::Settings));
|
||||
par.config_change_kind.replace(ConfigChangeKind::WguiColorPaletteChange);
|
||||
if let Some(c) = self.on_close_request.take() {
|
||||
c();
|
||||
|
|
|
|||
Loading…
Reference in New Issue