diff options
author | Martin Wimpress <[email protected]> | 2015-06-25 02:31:29 +0100 |
---|---|---|
committer | Martin Wimpress <[email protected]> | 2015-06-25 02:31:29 +0100 |
commit | 2cdfa50d1108f0e0300ecd73111bb9c04132cb53 (patch) | |
tree | 44b11f2b31fd5a07186a7ccfb498dcd75954f36a | |
parent | 2726adabc5efab673c1607de3780b3303e7f8b17 (diff) | |
parent | e76236f4739b9deee107c09b9b2f9a87c537c9a7 (diff) | |
download | caja-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
-rw-r--r-- | libcaja-private/caja-icon-container.c | 10 |
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); + } } } |