Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-06-27 17:37:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-06-27 17:37:16 +0400
commit31416d8d7e7fca90b30a579ddcc036fade804f9d (patch)
treeffd7192656f01383ac97e8e9f181947ac445719c /source
parentcd7cbc1e471c7c20d4cea577aa7ecf1809503b17 (diff)
The tab clickable area was a bit off (10px or so when zoomed in) now its a lot better though not 100% perfect abt 2-3px out.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/interface_panel.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c
index 899094e356f..e61d80c6121 100644
--- a/source/blender/src/interface_panel.c
+++ b/source/blender/src/interface_panel.c
@@ -1734,7 +1734,11 @@ static void ui_panel_untab(uiBlock *block)
static void panel_clicked_tabs(uiBlock *block, int mousex)
{
Panel *pa, *tabsel=NULL, *panel= block->panel;
- int nr= 1, a, width;
+ int nr= 1, a, width, ofsx;
+
+ ofsx= PNL_ICON;
+ if(block->panel->control & UI_PNL_CLOSE) ofsx+= PNL_ICON;
+
/* count */
pa= curarea->panels.first;
@@ -1749,12 +1753,13 @@ static void panel_clicked_tabs(uiBlock *block, int mousex)
/* find clicked tab, mouse in panel coords */
a= 0;
- width= (panel->sizex - 3- 2*PNL_ICON)/nr;
+ width= (int)((float)(panel->sizex - ofsx-10)/nr);
pa= curarea->panels.first;
while(pa) {
if(pa==panel || pa->paneltab==panel) {
- if( (mousex > PNL_ICON+a*width) && (mousex < PNL_ICON+(a+1)*width) ) {
+ if( (mousex > ofsx+a*width) && (mousex < ofsx+(a+1)*width) ) {
tabsel= pa;
+ break;
}
a++;
}