diff options
author | Matt Ebb <matt@mke3.net> | 2009-03-09 11:31:45 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-03-09 11:31:45 +0300 |
commit | 0fd155f78eca62241b1f15b6b820c1fa7924d778 (patch) | |
tree | 94a96cce001b84f30308881a76f7a97b3b06c473 /source/blender/editors/space_file/file_header.c | |
parent | a04e5795a0b3b3de82d0619fe687c4c3aa24404e (diff) |
* fun 2.5 UI commit from seoul airport!
A few UI goodies from on the plane:
- fixed the sliders for non-rounded themes
- Made properties with rna subtype of 'percentage' automatically display a '%'
character *after* the numerical value, where it belongs. It would also be really great
to add a ° - degree symbol after angle and perhaps rotation subtypes. This works
fine with international fonts but not with oldskool bitmap fonts (not part of ascii). I
wonder if there's a way to get around this?
- Added nice embossing effects on buttons, labels and pulldowns (there you go, brecht :)
- and cooler looking tooltips
And did some work on the file browser. Andrea, I hope this is ok, let me know if
there are problems and I can work on fixing it up :)
- added some new icons for file types, that are now shown in list view.
icon designers, please feel free to update and make nicer ones!
- tweaked the default colour theme and did some graphical fiddling to make the
various views look nicer
- rearranged the buttons on the header and swapped the 'P' button for an up arrow
button, this needs a nicer icon too.
- added outliner style alternating bands to the list view to see info grouping better.
This has a small prob in columns view though, can fix that.
Diffstat (limited to 'source/blender/editors/space_file/file_header.c')
-rw-r--r-- | source/blender/editors/space_file/file_header.c | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/source/blender/editors/space_file/file_header.c b/source/blender/editors/space_file/file_header.c index 1e4feeed405..e278b9cd227 100644 --- a/source/blender/editors/space_file/file_header.c +++ b/source/blender/editors/space_file/file_header.c @@ -128,10 +128,10 @@ void file_header_buttons(const bContext *C, ARegion *ar) xco= ED_area_header_standardbuttons(C, block, yco); + /* if((sa->flag & HEADER_NO_PULLDOWN)==0) { int xmax; - /* pull down menus */ uiBlockSetEmboss(block, UI_EMBOSSP); xmax= GetButStringLength("View"); @@ -139,34 +139,46 @@ void file_header_buttons(const bContext *C, ARegion *ar) "View", xco, yco-2, xmax-3, 24, ""); xco+=XIC+xmax; } + */ /* SORT TYPE */ uiBlockSetEmboss(block, UI_EMBOSSX); + + xco += 5; + + uiDefIconButO(block, BUT, "FILE_OT_parent", WM_OP_INVOKE_DEFAULT, ICON_TRIA_UP, xco, yco, 20, 20, "Navigate to Parent Folder"); + xco+=XIC; + + 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"); + uiBlockEndAlign(block); + + xco+=XIC; + } + uiBlockBeginAlign(block); - uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTALPHA, xco+=XIC,0,XIC,YIC, ¶ms->sort, 1.0, 0.0, 0, 0, "Sorts files alphabetically"); - uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTBYEXT, xco+=XIC,0,XIC,YIC, ¶ms->sort, 1.0, 3.0, 0, 0, "Sorts files by extension"); - uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTTIME, xco+=XIC,0,XIC,YIC, ¶ms->sort, 1.0, 1.0, 0, 0, "Sorts files by time"); - uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTSIZE, xco+=XIC,0,XIC,YIC, ¶ms->sort, 1.0, 2.0, 0, 0, "Sorts files by size"); + uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTALPHA, xco+=XIC, yco, XIC,YIC, ¶ms->sort, 1.0, 0.0, 0, 0, "Sorts files alphabetically"); + uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTBYEXT, xco+=XIC, yco, XIC,YIC, ¶ms->sort, 1.0, 3.0, 0, 0, "Sorts files by extension"); + uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTTIME, xco+=XIC, yco, XIC,YIC, ¶ms->sort, 1.0, 1.0, 0, 0, "Sorts files by time"); + uiDefIconButS(block, ROW, B_SORTIMASELLIST, ICON_SORTSIZE, xco+=XIC, yco, XIC,YIC, ¶ms->sort, 1.0, 2.0, 0, 0, "Sorts files by size"); uiBlockEndAlign(block); - xco+=XIC+10; + + xco+=XIC; + /* replace with consistent sub-region collapsing if (sfile->params->type != FILE_MAIN) { uiBlockBeginAlign(block); // uiDefIconButBitS(block, TOG, FILE_BOOKMARKS, B_RELOADIMASELDIR, ICON_BOOKMARKS,xco+=XIC,0,XIC,YIC, ¶ms->flag, 0, 0, 0, 0, "Toggles Bookmarks on/off"); - uiDefIconButO(block, TOG, "FILE_OT_bookmark_toggle", WM_OP_INVOKE_DEFAULT, ICON_BOOKMARKS, xco,yco,20,20, "Toggle Bookmarks"); + uiDefIconButO(block, TOG, "FILE_OT_bookmark_toggle", WM_OP_INVOKE_DEFAULT, ICON_BOOKMARKS, xco+XIC,yco,20,20, "Toggle Bookmarks"); uiBlockEndAlign(block); - xco+=XIC+10; - } + xco+=XIC; + } + */ - if (sfile->params->type != FILE_MAIN) { - uiBlockBeginAlign(block); - uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_SHORTDISPLAY, xco+=XIC,0,XIC,YIC, ¶ms->display, 1.0, 1.0, 0, 0, "Displays short file description"); - uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_LONGDISPLAY, xco+=XIC,0,XIC,YIC, ¶ms->display, 1.0, 2.0, 0, 0, "Displays long file description"); - uiDefIconButS(block, ROW, B_RELOADIMASELDIR, ICON_IMAGE_COL /* ICON_IMGDISPLAY */, xco+=XIC,0,XIC,YIC, ¶ms->display, 1.0, 3.0, 0, 0, "Displays files as thumbnails"); - uiBlockEndAlign(block); - xco+=XIC+10; - } xcotitle= xco; xco+= UI_GetStringWidth(G.font, params->title, 0); |