diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-27 16:23:48 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-27 16:23:48 +0300 |
commit | 41545885b8cc00383c72b73ec66a279e26baddcf (patch) | |
tree | fb96f5891035d944ae9f69506104f49c9675fb6a /source/blender/src/header_text.c | |
parent | 32a03fe4601d7449e7b8d1cbd452c1d0c4be3e2a (diff) |
- added a 'collapse pulldown' icon to all headers that have it
- narrowed the space icon takes, looks pretty
- the status (pulldown or not) is now stored locally per window, it was
global flag in user settings.
Diffstat (limited to 'source/blender/src/header_text.c')
-rw-r--r-- | source/blender/src/header_text.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/source/blender/src/header_text.c b/source/blender/src/header_text.c index 69d52b27bf4..2e3bbd29b2a 100644 --- a/source/blender/src/header_text.c +++ b/source/blender/src/header_text.c @@ -463,24 +463,36 @@ void text_buttons(void) curarea->butspacetype= SPACE_TEXT; xco = 8; - uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types."); + xco+= XIC+10; + + uiBlockSetEmboss(block, UI_EMBOSSN); + if(curarea->flag & HEADER_NO_PULLDOWN) { + uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT, + xco,2,XIC,YIC-2, + &(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus"); + } else { + uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN, + xco,2,XIC,YIC-2, + &(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus"); + } + uiBlockSetEmboss(block, UI_EMBOSS); + xco+=XIC; - xco+= XIC+22; - /* pull down menus */ - uiBlockSetEmboss(block, UI_EMBOSSP); - - xmax= GetButStringLength("File"); - uiDefBlockBut(block,text_filemenu, NULL, "File", xco, 0, xmax, 20, ""); - xco+=xmax; - - if(text) { - xmax= GetButStringLength("Edit"); - uiDefBlockBut(block,text_editmenu, NULL, "Edit", xco, 0, xmax, 20, ""); - xco+=xmax; + if((curarea->flag & HEADER_NO_PULLDOWN)==0) { + uiBlockSetEmboss(block, UI_EMBOSSP); + + xmax= GetButStringLength("File"); + uiDefBlockBut(block,text_filemenu, NULL, "File", xco, 0, xmax, 20, ""); + xco+=xmax; + + if(text) { + xmax= GetButStringLength("Edit"); + uiDefBlockBut(block,text_editmenu, NULL, "Edit", xco, 0, xmax, 20, ""); + xco+=xmax; + } } - uiBlockSetEmboss(block, UI_EMBOSSX); xco += 10; |