[shotwell: 3/5] stepped selection to reduce flicker
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell: 3/5] stepped selection to reduce flicker
- Date: Mon, 9 Jul 2018 20:20:18 +0000 (UTC)
commit e952ce83ba1ed0a0403d36f9b7ec040577fd1a93
Author: Carsten Csiky (csicar) <carsten csiky gmail com>
Date: Wed Jul 4 11:30:57 2018 +0200
stepped selection to reduce flicker
src/events/EventDirectoryItem.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/events/EventDirectoryItem.vala b/src/events/EventDirectoryItem.vala
index d943af84..4922375a 100644
--- a/src/events/EventDirectoryItem.vala
+++ b/src/events/EventDirectoryItem.vala
@@ -172,7 +172,8 @@ class EventDirectoryItem : CheckerboardItem {
}
public override void handle_mouse_motion(int x, int y, int height, int width) {
- int element_index = (int) Math.round( (double) x / width * (event.get_media_count() - 1) );
+ int steppedX = x - (x % 30);
+ int element_index = (int) Math.round( (double) steppedX / width * (event.get_media_count() - 1) );
unowned MediaSource media = event.get_media().to_array()[element_index];
set_paul_lynde(media);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]