Compare commits
No commits in common. "c19c2cbd1d7ff348ed401123a90174eb0d88d528" and "b280d832347358cad5ecc2828a64038c7ffff5ea" have entirely different histories.
c19c2cbd1d
...
b280d83234
4 changed files with 1 additions and 29 deletions
|
|
@ -13,7 +13,7 @@ It follows the [river of news](http://scripting.com/2014/06/02/whatIsARiverOfNew
|
|||
|
||||
- **River of news**: all unread articles in one flat list, auto-marked as read as you flip through them one by one
|
||||
- **Offline reading**: article content and images are cached locally so you can read without a connection
|
||||
- **Image caching**: images are pre-fetched after each reload; can be disabled in preferences and is always skipped on metered connections
|
||||
- **Image caching**: images are pre-fetched after each reload; skipped on metered connections unless enabled in preferences
|
||||
- **Offline sync**: read/unread state changes made offline are queued and pushed to the server next time you're online
|
||||
- **Persistent state**: the article list, selected article, and scroll position are restored when you reopen the app
|
||||
- **Dark mode**: follows the system color scheme automatically
|
||||
|
|
|
|||
|
|
@ -70,9 +70,6 @@ mod imp {
|
|||
}
|
||||
.sidebar-content row:selected {
|
||||
background-color: alpha(@window_fg_color, 0.22);
|
||||
}
|
||||
.unread-title {
|
||||
font-weight: bold;
|
||||
}"
|
||||
);
|
||||
gtk4::style_context_add_provider_for_display(
|
||||
|
|
|
|||
|
|
@ -83,10 +83,8 @@ mod imp {
|
|||
let unread = obj.article().unread;
|
||||
if unread {
|
||||
title_label.remove_css_class("dim-label");
|
||||
title_label.add_css_class("unread-title");
|
||||
} else {
|
||||
title_label.add_css_class("dim-label");
|
||||
title_label.remove_css_class("unread-title");
|
||||
}
|
||||
});
|
||||
*self.unread_handler.borrow_mut() = Some((obj.clone(), id));
|
||||
|
|
@ -104,10 +102,8 @@ mod imp {
|
|||
fn update_read_style(&self, unread: bool) {
|
||||
if unread {
|
||||
self.title_label.remove_css_class("dim-label");
|
||||
self.title_label.add_css_class("unread-title");
|
||||
} else {
|
||||
self.title_label.add_css_class("dim-label");
|
||||
self.title_label.remove_css_class("unread-title");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ pub mod imp {
|
|||
pub current_article_id: RefCell<Option<String>>,
|
||||
pub mark_unread_guard: RefCell<bool>,
|
||||
pub pending_restore_id: RefCell<Option<String>>,
|
||||
pub sidebar_zoom_css: std::cell::OnceCell<gtk4::CssProvider>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
@ -141,16 +140,6 @@ pub mod imp {
|
|||
let zoom = settings.double("zoom-level");
|
||||
self.web_view.set_zoom_level(zoom);
|
||||
|
||||
// Set up sidebar font zoom CSS provider
|
||||
let zoom_css = gtk4::CssProvider::new();
|
||||
gtk4::style_context_add_provider_for_display(
|
||||
>k4::gdk::Display::default().unwrap(),
|
||||
&zoom_css,
|
||||
gtk4::STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
);
|
||||
self.sidebar_zoom_css.set(zoom_css).ok();
|
||||
self.update_sidebar_zoom(zoom);
|
||||
|
||||
// Persist sidebar width while dragging (only when visible)
|
||||
let s2 = settings.clone();
|
||||
let sidebar_weak = self.sidebar_toolbar.downgrade();
|
||||
|
|
@ -805,26 +794,16 @@ pub mod imp {
|
|||
|
||||
// ── Zoom ──────────────────────────────────────────────────────────────
|
||||
|
||||
fn update_sidebar_zoom(&self, level: f64) {
|
||||
if let Some(css) = self.sidebar_zoom_css.get() {
|
||||
css.load_from_string(&format!(
|
||||
".sidebar-content label {{ font-size: {level}em; }}"
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
fn zoom(&self, factor: f64) {
|
||||
let wv = &*self.web_view;
|
||||
let new_level = (wv.zoom_level() * factor).clamp(0.25, 5.0);
|
||||
wv.set_zoom_level(new_level);
|
||||
self.update_sidebar_zoom(new_level);
|
||||
let settings = gio::Settings::new("net.jeena.FeedTheMonkey");
|
||||
settings.set_double("zoom-level", new_level).ok();
|
||||
}
|
||||
|
||||
fn zoom_reset(&self) {
|
||||
self.web_view.set_zoom_level(1.0);
|
||||
self.update_sidebar_zoom(1.0);
|
||||
let settings = gio::Settings::new("net.jeena.FeedTheMonkey");
|
||||
settings.set_double("zoom-level", 1.0).ok();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue