summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2015-06-25 02:31:29 +0100
committerMartin Wimpress <[email protected]>2015-06-25 02:31:29 +0100
commit2cdfa50d1108f0e0300ecd73111bb9c04132cb53 (patch)
tree44b11f2b31fd5a07186a7ccfb498dcd75954f36a /libcaja-private
parent2726adabc5efab673c1607de3780b3303e7f8b17 (diff)
parente76236f4739b9deee107c09b9b2f9a87c537c9a7 (diff)
downloadcaja-2cdfa50d1108f0e0300ecd73111bb9c04132cb53.tar.bz2
caja-2cdfa50d1108f0e0300ecd73111bb9c04132cb53.tar.xz
Merge pull request #434 from mate-desktop/leave-my-scrollbar-alone
compact view: don't auto-scroll to the right on long filenames
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-container.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 5db10601..3757dabc 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -763,15 +763,17 @@ reveal_icon (CajaIconContainer *container,
if (bounds.y0 < gtk_adjustment_get_value (vadj)) {
eel_gtk_adjustment_set_value (vadj, bounds.y0);
} else if (bounds.y1 > gtk_adjustment_get_value (vadj) + allocation.height) {
- eel_gtk_adjustment_set_value
- (vadj, bounds.y1 - allocation.height);
+ eel_gtk_adjustment_set_value (vadj, bounds.y1 - allocation.height);
}
if (bounds.x0 < gtk_adjustment_get_value (hadj)) {
eel_gtk_adjustment_set_value (hadj, bounds.x0);
} else if (bounds.x1 > gtk_adjustment_get_value (hadj) + allocation.width) {
- eel_gtk_adjustment_set_value
- (hadj, bounds.x1 - allocation.width);
+ if (bounds.x1 - allocation.width > bounds.x0) {
+ eel_gtk_adjustment_set_value (hadj, bounds.x0);
+ } else {
+ eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width);
+ }
}
}