Skip to content

Commit

Permalink
Merge branch 'main' into paginate-timeline-by-scroll-#109
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinaboos authored Oct 11, 2024
2 parents bb93b39 + 0e349be commit cac4a04
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ The following table shows which host systems can currently be used to build Robr

2. If you're building on **Linux** or **WSL** on Windows, install the required dependencies. Otherwise, proceed to step 3.
* `openssl`, `clang`/`libclang`, `binfmt`, `Xcursor`/`X11`, `asound`/`pulse`.

On a Debian-like Linux distro (e.g., Ubuntu), run the following:
```sh
sudo apt-get update
sudo apt-get install libssl-dev libsqlite3-dev pkg-config llvm clang libclang-dev binfmt-support libxcursor-dev libx11-dev libasound2-dev libpulse-dev
sudo apt-get install libssl-dev libsqlite3-dev pkg-config binfmt-support libxcursor-dev libx11-dev libasound2-dev libpulse-dev
```

3. Then, build and run Robrix (you can optionally add `--release` after `run`):
Expand Down Expand Up @@ -78,7 +78,7 @@ cargo run -- 'USERNAME' 'PASSWORD' ['HOMESERVER_URL']
* API version 33 or higher is required, which is Android 13 and up.
## Feature status tracker
## Feature status tracker
These are generally sorted in order of priority. If you're interested in helping out with anything here, please reach out via a GitHub issue or on our Robius matrix channel.

Expand All @@ -93,7 +93,7 @@ These are generally sorted in order of priority. If you're interested in helping
- [ ] Loading animation while waiting for pagination request: https://github.com/project-robius/robrix/issues/109
- [x] Stable positioning of events during simple timeline update
- [x] Stable positioning of events during complex/multi-part timeline update
- [ ] Re-spawn timeline as focused on an old event after a full timeline clear: https://github.com/project-robius/robrix/issues/103
- [ ] Re-spawn timeline as focused on an old event after a full timeline clear: https://github.com/project-robius/robrix/issues/103
- [x] Display simple text-only messages
- [x] Display image messages (PNG, JPEG)
- [x] Rich text formatting for message bodies
Expand Down
23 changes: 7 additions & 16 deletions src/home/room_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,8 @@ live_design! {
ICO_ADD = dep("crate://self/resources/icon_add.svg")
ICO_CLOSE = dep("crate://self/resources/icons/close.svg")
ICO_JUMP_TO_BOTTOM = dep("crate://self/resources/icon_jump_to_bottom.svg")

ICO_LOCATION_PERSON = dep("crate://self/resources/icons/location-person.svg")

TEXT_SUB = {
font_size: (10),
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
}

TEXT_P = {
font_size: (12),
height_factor: 1.65,
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
}
ICO_LOCATION_PERSON = dep("crate://self/resources/icons/location-person.svg")

COLOR_BG = #xfff8ee
COLOR_BRAND = #x5
Expand Down Expand Up @@ -745,6 +734,8 @@ live_design! {
}

send_location_button = <RobrixIconButton> {
// disabled by default; will be enabled upon receiving valid location update.
enabled: false,
padding: {left: 15, right: 15}
draw_icon: {
svg_file: (ICO_SEND)
Expand Down Expand Up @@ -1028,13 +1019,13 @@ impl RoomScreen{
return;
}
let first_index = portal_list.first_id();

let Some(tl_state) = self.tl_state.as_mut() else { return };
let Some(room_id) = self.room_id.as_ref() else { return };
if let Some(ref mut index) = tl_state.prev_first_index {
// to detect change of scroll when scroll ends
if *index != first_index {
// scroll changed
if *index != first_index {
// scroll changed
self.fully_read_timer = cx.start_interval(5.0);
let time_now = std::time::Instant::now();
if first_index > *index {
Expand Down Expand Up @@ -1825,7 +1816,7 @@ impl RoomScreen {
if first_time_showing_room {
self.process_timeline_updates(cx);
}

self.redraw(cx);
}

Expand Down
28 changes: 11 additions & 17 deletions src/shared/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,32 @@ use makepad_widgets::*;

live_design! {

import makepad_widgets::theme_desktop_dark::*;
ICON_BLOCK_USER = dep("crate://self/resources/icons/forbidden.svg")
ICON_CHECKMARK = dep("crate://self/resources/icons/checkmark.svg")
ICON_CLOSE = dep("crate://self/resources/icons/close.svg")


TITLE_TEXT = {

TITLE_TEXT = <THEME_FONT_REGULAR>{
font_size: (13),
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
}

REGULAR_TEXT = {
REGULAR_TEXT = <THEME_FONT_REGULAR>{
font_size: (10),
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
}

TEXT_SUB = {
font_size: (8),
height_factor: 1.5,
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
TEXT_SUB = <THEME_FONT_REGULAR>{
font_size: (10),
}

USERNAME_FONT_SIZE = 11
USERNAME_TEXT_COLOR = #x2
USERNAME_TEXT_STYLE = {
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-SemiBold.ttf")}
USERNAME_TEXT_STYLE = <THEME_FONT_BOLD>{
font_size: (USERNAME_FONT_SIZE),
// height_factor: 1.5,
}


TYPING_NOTICE_TEXT_COLOR = #121570

MESSAGE_FONT_SIZE = 11
Expand All @@ -39,8 +36,7 @@ live_design! {
MESSAGE_TEXT_HEIGHT_FACTOR = 1.55
// This font should only be used for plaintext labels. Don't use this for Html content,
// as the Html widget sets different fonts for different text styles (e.g., bold, italic).
MESSAGE_TEXT_STYLE = {
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
MESSAGE_TEXT_STYLE = <THEME_FONT_REGULAR>{
font_size: (MESSAGE_FONT_SIZE),
height_factor: (MESSAGE_TEXT_HEIGHT_FACTOR),
line_spacing: (MESSAGE_TEXT_LINE_SPACING),
Expand All @@ -50,16 +46,14 @@ live_design! {

SMALL_STATE_FONT_SIZE = 9.0
SMALL_STATE_TEXT_COLOR = #x888
SMALL_STATE_TEXT_STYLE = {
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
SMALL_STATE_TEXT_STYLE = <THEME_FONT_REGULAR>{
font_size: (SMALL_STATE_FONT_SIZE),
height_factor: 1.3,
}

TIMESTAMP_FONT_SIZE = 8.5
TIMESTAMP_TEXT_COLOR = #x999
TIMESTAMP_TEXT_STYLE = {
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
TIMESTAMP_TEXT_STYLE = <THEME_FONT_REGULAR>{
font_size: (TIMESTAMP_FONT_SIZE),
}

Expand Down

0 comments on commit cac4a04

Please sign in to comment.