black background

This commit is contained in:
William Casarin
2024-03-09 01:21:07 -08:00
parent 088d012c93
commit 4a5a9d4319
3 changed files with 19 additions and 5 deletions

10
Cargo.lock generated
View File

@@ -844,6 +844,7 @@ dependencies = [
"objc",
"parking_lot",
"percent-encoding",
"pollster",
"puffin",
"raw-window-handle 0.5.2",
"raw-window-handle 0.6.0",
@@ -853,6 +854,7 @@ dependencies = [
"wasm-bindgen-futures",
"web-sys",
"web-time",
"wgpu",
"winapi",
"winit",
]
@@ -2396,6 +2398,12 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "pollster"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -3811,6 +3819,7 @@ dependencies = [
"cfg_aliases",
"js-sys",
"log",
"naga",
"parking_lot",
"profiling",
"raw-window-handle 0.6.0",
@@ -3860,6 +3869,7 @@ dependencies = [
"arrayvec",
"ash",
"bitflags 2.4.2",
"block",
"cfg_aliases",
"core-graphics-types",
"glow",

View File

@@ -14,6 +14,7 @@ crate-type = ["lib", "cdylib"]
#egui-android = { git = "https://github.com/jb55/egui-android.git" }
egui = "0.26.0"
eframe = { version = "0.26.0", default-features = false, features = [ "glow", "wgpu", "android-native-activity" ] }
#eframe = { version = "0.26.0", default-features = false, features = [ "glow", "android-native-activity" ] }
#eframe = "0.22.0"
egui_extras = { version = "0.26.0", features = ["all_loaders"] }
ehttp = "0.2.0"

View File

@@ -13,8 +13,8 @@ use std::borrow::Cow;
use egui::widgets::Spinner;
use egui::{
Color32, Context, Frame, Hyperlink, Image, Label, Margin, RichText, Sense, Style,
TextureHandle, Vec2, Visuals,
CollapsingHeader, Color32, Context, Frame, Hyperlink, Image, Label, Margin, RichText, Sense,
Style, TextureHandle, Vec2, Visuals,
};
use enostr::{ClientMessage, Filter, Pubkey, RelayEvent, RelayMessage};
@@ -300,7 +300,7 @@ fn setup_initial_nostrdb_subs(damus: &mut Damus) -> Result<()> {
.collect();
damus.timelines[0].subscription = Some(damus.ndb.subscribe(filters.clone())?);
let txn = Transaction::new(&damus.ndb)?;
let res = damus.ndb.query(&txn, filters, 200)?;
let res = damus.ndb.query(&txn, filters, 100)?;
damus.timelines[0].notes = res
.iter()
.map(|qr| NoteRef {
@@ -642,7 +642,7 @@ fn render_note_contents(
let blocks = if let Ok(blocks) = damus.ndb.get_blocks_by_key(txn, note_key) {
blocks
} else {
warn!("note content '{}'", note.content());
warn!("missing note content blocks? '{}'", note.content());
ui.weak(note.content());
return;
};
@@ -755,6 +755,8 @@ fn render_note(ui: &mut egui::Ui, damus: &mut Damus, note_key: NoteKey) -> Resul
});
render_note_contents(ui, damus, &txn, &note, note_key);
//render_note_actionbar(ui, damus);
})
});
});
@@ -859,7 +861,8 @@ fn set_app_style(style: &mut Style) {
visuals.hyperlink_color = PURPLE;
if visuals.dark_mode {
visuals.override_text_color = Some(egui::Color32::from_rgb(250, 250, 250));
visuals.panel_fill = egui::Color32::from_rgb(31, 31, 31);
//visuals.panel_fill = egui::Color32::from_rgb(31, 31, 31);
visuals.panel_fill = egui::Color32::from_rgb(0, 0, 0);
//visuals.override_text_color = Some(egui::Color32::from_rgb(170, 177, 190));
//visuals.panel_fill = egui::Color32::from_rgb(40, 44, 52);
} else {