Commit Graph

16 Commits

Author SHA1 Message Date
William Casarin
2f20e8253e app: simplify Damus::new constructor
Just take an egui::Context instead of an eframe::CreationContext.
This should make it easier to test the app via egui::Context::default();

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:53:29 -08:00
William Casarin
fab1257f6e paths: remove hardcoded basepath
Before we were hardcoding the basepath with dirs, which isn't that
useful for testing, previews, or for android. Let's fix that.

This also moves the db and cache directories into our root DataPaths.
This is a breaking change, we don't have a migration step. sorry.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 09:55:56 -08:00
kernelkind
03bfb34172 app window size persists on app close
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-25 15:23:35 -04:00
William Casarin
577aa76ac7 add --light lightmode flag to previews and notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-14 11:12:16 -07:00
William Casarin
2305f1e50a mobile: make mobile flag runtime-configurable
we need to pass a few more things around but it's not that bad. This
will allow you to launch damus with --mobile for mobile testing without
recompilation.
2024-05-31 01:05:53 -05:00
William Casarin
dbc56ac098 mobile: simplify is_mobile
we don't need context anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 18:01:04 -07:00
William Casarin
9e8f7a2e5c ui: integrate egui-tabs for notes & replies selector
demo: https://cdn.jb55.com/s/notedeck-tabs.mp4

Fixes: https://github.com/damus-io/notedeck/issues/47
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 17:28:01 -07:00
William Casarin
1d44b08f13 ui: make pixel sizes correct, use more of the figma
I noticed the pixel sizes were off which made it harder to match the
pixel dimensions of rob's figma designs. This restores the pixel size
and adjust the font sizes so that things look somewhat ok with the
default pixel settings.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 17:45:09 -07:00
William Casarin
2f6f92e62c style: set 0 duration tooltip delay
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-21 15:03:05 -07:00
William Casarin
a71e8206fb introduce View and Previews traits
In this commit we refactor the preview mechanism, and switch to
responsive views by default.

To create a preview, your view now has to implement the Preview trait.
This is very similar to SwiftUI's preview mechanism.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 14:13:11 -07:00
William Casarin
dcd53beea8 remove minimum window size
This is preventing me from doing a single column layout on desktop

Cc: kernelkind
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-14 12:11:30 -07:00
William Casarin
3b9cd3f3c4 mobile: black panel bg color
for battery life

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 21:14:56 -07:00
kernelkind
f0d56da4f5 Use custom style in app
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 19:53:23 -07:00
kernelkind
cf07427204 Refactor 'ui tests' conception to previews
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 19:52:34 -07:00
kernelkind
242053c6e0 Constrain app minimum size
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-04-01 10:15:47 -07:00
kernelkind
80b76c5381 Use app_creation for common app setup functions
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-04-01 10:15:45 -07:00