diff --git a/.ci_scripts/run_build.sh b/.ci_scripts/run_build.sh index f3cb2362b6..bde1e3148b 100755 --- a/.ci_scripts/run_build.sh +++ b/.ci_scripts/run_build.sh @@ -25,8 +25,8 @@ case "$BUILD_TARGET" in fi ;; "flatpak") - flatpak-builder repo com.github.bvschaik.julius.json --install-deps-from=flathub --keep-build-dirs - cp .flatpak-builder/build/julius/res/version.txt res/version.txt + flatpak-builder repo com.github.keriew.augustus.json --install-deps-from=flathub --keep-build-dirs + cp .flatpak-builder/build/augustus/res/version.txt res/version.txt ;; "appimage") cp -r res/maps ./build diff --git a/com.github.bvschaik.julius.json b/com.github.keriew.augustus.json similarity index 80% rename from com.github.bvschaik.julius.json rename to com.github.keriew.augustus.json index db6bfdb468..f130137f4c 100644 --- a/com.github.bvschaik.julius.json +++ b/com.github.keriew.augustus.json @@ -1,11 +1,10 @@ { - "id" : "com.github.bvschaik.julius", + "id" : "com.github.keriew.augustus", "runtime" : "org.freedesktop.Platform", "runtime-version" : "23.08", "sdk" : "org.freedesktop.Sdk", - "command" : "julius", + "command" : "augustus", "finish-args" : [ - "--filesystem=home", "--share=ipc", "--device=dri", "--socket=wayland", @@ -14,7 +13,7 @@ ], "modules" : [ { - "name" : "julius", + "name" : "augustus", "buildsystem" : "cmake-ninja", "sources" : [ { diff --git a/src/graphics/scrollbar.c b/src/graphics/scrollbar.c index fa24129af5..333d88bf01 100644 --- a/src/graphics/scrollbar.c +++ b/src/graphics/scrollbar.c @@ -13,12 +13,6 @@ enum { TOUCH_DRAG_IN_PROGRESS = 2 }; -enum { - TOUCH_DRAG_NONE = 0, - TOUCH_DRAG_PENDING = 1, - TOUCH_DRAG_IN_PROGRESS = 2 -}; - #define SCROLL_BUTTON_HEIGHT 26 #define SCROLL_BUTTON_WIDTH 39 #define SCROLL_DOT_SIZE 25 @@ -135,41 +129,6 @@ static int handle_touch(scrollbar_type *scrollbar, const touch *t, int in_dialog return active; } -static int touch_inside_scrollable_area(const scrollbar_type *scrollbar, const touch *t) -{ - return scrollbar->max_scroll_position > 0 && - t->start_point.x >= scrollbar->x - scrollbar->scrollable_width && t->start_point.x <= scrollbar->x - 2 && - t->start_point.y >= scrollbar->y && t->start_point.y < scrollbar->y + scrollbar->height; -} - -static int handle_touch(scrollbar_type *scrollbar, const touch *t) -{ - int old_position = scrollbar->scroll_position; - int active = scrollbar->touch_drag_state == TOUCH_DRAG_IN_PROGRESS; - - if (t->has_started && touch_inside_scrollable_area(scrollbar, t)) { - scrollbar->touch_drag_state = TOUCH_DRAG_PENDING; - scrollbar->position_on_touch = scrollbar->scroll_position; - } - if (t->has_moved && scrollbar->touch_drag_state != TOUCH_DRAG_NONE) { - scrollbar->touch_drag_state = TOUCH_DRAG_IN_PROGRESS; - int element_height = (scrollbar->height - 8 * scrollbar->has_y_margin) / scrollbar->elements_in_view; - int current_y = t->current_point.y - ((t->current_point.y - (scrollbar->y + 8 * scrollbar->has_y_margin)) % element_height); - int start_y = t->start_point.y - ((t->start_point.y - (scrollbar->y + 8 * scrollbar->has_y_margin)) % element_height); - int touch_scrolled = (current_y - start_y) / element_height; - scrollbar->scroll_position = calc_bound(scrollbar->position_on_touch - touch_scrolled, 0, scrollbar->max_scroll_position); - active = 1; - } - if (t->has_ended) { - scrollbar->touch_drag_state = TOUCH_DRAG_NONE; - // decay scrollbar movement - } - if (scrollbar->on_scroll_callback && old_position != scrollbar->scroll_position) { - scrollbar->on_scroll_callback(); - } - return active; -} - static int handle_scrollbar_dot(scrollbar_type *scrollbar, const mouse *m) { if (scrollbar->max_scroll_position <= 0 || !m->left.is_down) {