struct SpaceFile;
+// XXX for Elubie:
+// defining FILE_LONGDISPLAY as 0 for now, since that seems to be the default case
+// for drawing the files (so that scrollbars will draw correct).
+// Dunno if these values are saved in files, so hopefully this is ok.
+// Revert this change if there's a more correct way to do this
+// Aligorith (09Mar2009)
+#define FILE_LONGDISPLAY 0
#define FILE_SHORTDISPLAY 1
-#define FILE_LONGDISPLAY 2
+//#define FILE_LONGDISPLAY 2
#define FILE_IMGDISPLAY 3
typedef struct FileSelectParams {
if (sfile->params->type != FILE_MAIN) {
uiBlockBeginAlign(block);
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_SHORTDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, 1.0, 0, 0, "Displays short file description");
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_LONGDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, 2.0, 0, 0, "Displays long file description");
- uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_IMGDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, 3.0, 0, 0, "Displays files as thumbnails");
+ uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_SHORTDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, FILE_SHORTDISPLAY, 0, 0, "Displays short file description");
+ uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_LONGDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, FILE_LONGDISPLAY, 0, 0, "Displays long file description");
+ uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_IMGDISPLAY, xco+=XIC, yco, XIC,YIC, ¶ms->display, 1.0, FILE_IMGDISPLAY, 0, 0, "Displays files as thumbnails");
uiBlockEndAlign(block);
xco+=XIC;
glClear(GL_COLOR_BUFFER_BIT);
/* Allow dynamically sliders to be set, saves notifiers etc. */
- if (sfile->params && ( (sfile->params->display == FILE_IMGDISPLAY) || (sfile->params->display == FILE_LONGDISPLAY)) )
+ if (sfile->params && ( (sfile->params->display == FILE_IMGDISPLAY) || (sfile->params->display == FILE_LONGDISPLAY)) ) {
v2d->scroll = V2D_SCROLL_RIGHT;
- else
+ v2d->keepofs &= ~V2D_LOCKOFS_Y;
+ v2d->keepofs |= V2D_LOCKOFS_X;
+ }
+ else {
v2d->scroll = V2D_SCROLL_BOTTOM;
- /* v2d has initialized flag, so this call will only set the mask correct */
+ v2d->keepofs &= ~V2D_LOCKOFS_X;
+ v2d->keepofs |= V2D_LOCKOFS_Y;
+ }
+ /* v2d has initialized flag, so this call will only set the mask correct */
UI_view2d_region_reinit(v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* sets tile/border settings in sfile */