style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25174 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -277,7 +277,7 @@ get_mouse_type(int32 *type)
|
|||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
|
|
||||||
if(reply.FindInt32("mouse_type", type) != B_OK)
|
if (reply.FindInt32("mouse_type", type) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
@@ -105,13 +105,13 @@ using std::nothrow;
|
|||||||
* update region fBounds
|
* update region fBounds
|
||||||
*/
|
*/
|
||||||
#define EXTENTS(r,idRect){\
|
#define EXTENTS(r,idRect){\
|
||||||
if((r)->left < (idRect)->fBounds.left)\
|
if ((r)->left < (idRect)->fBounds.left)\
|
||||||
(idRect)->fBounds.left = (r)->left;\
|
(idRect)->fBounds.left = (r)->left;\
|
||||||
if((r)->top < (idRect)->fBounds.top)\
|
if ((r)->top < (idRect)->fBounds.top)\
|
||||||
(idRect)->fBounds.top = (r)->top;\
|
(idRect)->fBounds.top = (r)->top;\
|
||||||
if((r)->right > (idRect)->fBounds.right)\
|
if ((r)->right > (idRect)->fBounds.right)\
|
||||||
(idRect)->fBounds.right = (r)->right;\
|
(idRect)->fBounds.right = (r)->right;\
|
||||||
if((r)->bottom > (idRect)->fBounds.bottom)\
|
if ((r)->bottom > (idRect)->fBounds.bottom)\
|
||||||
(idRect)->fBounds.bottom = (r)->bottom;\
|
(idRect)->fBounds.bottom = (r)->bottom;\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ BTabView::Select(int32 index)
|
|||||||
|
|
||||||
tab = TabAt(index);
|
tab = TabAt(index);
|
||||||
if (tab && ContainerView()) {
|
if (tab && ContainerView()) {
|
||||||
if(index == 0)
|
if (index == 0)
|
||||||
fTabOffset = 0.0f;
|
fTabOffset = 0.0f;
|
||||||
tab->Select(ContainerView());
|
tab->Select(ContainerView());
|
||||||
fSelection = index;
|
fSelection = index;
|
||||||
@@ -682,8 +682,8 @@ BTabView::Select(int32 index)
|
|||||||
|
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
|
||||||
if(index != 0 && !Bounds().Contains(TabFrame(index))){
|
if (index != 0 && !Bounds().Contains(TabFrame(index))){
|
||||||
if(!Bounds().Contains(TabFrame(index).LeftTop()))
|
if (!Bounds().Contains(TabFrame(index).LeftTop()))
|
||||||
fTabOffset += TabFrame(index).left - Bounds().left - 20.0f;
|
fTabOffset += TabFrame(index).left - Bounds().left - 20.0f;
|
||||||
else
|
else
|
||||||
fTabOffset += TabFrame(index).right - Bounds().right + 20.0f;
|
fTabOffset += TabFrame(index).right - Bounds().right + 20.0f;
|
||||||
@@ -719,7 +719,7 @@ BTabView::SetFocusTab(int32 tab, bool focused)
|
|||||||
if (tab >= CountTabs())
|
if (tab >= CountTabs())
|
||||||
tab = 0;
|
tab = 0;
|
||||||
|
|
||||||
if(tab < 0)
|
if (tab < 0)
|
||||||
tab = CountTabs() - 1;
|
tab = CountTabs() - 1;
|
||||||
|
|
||||||
if (focused) {
|
if (focused) {
|
||||||
@@ -727,11 +727,11 @@ BTabView::SetFocusTab(int32 tab, bool focused)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (fFocus != -1){
|
if (fFocus != -1){
|
||||||
if(TabAt (fFocus) != NULL)
|
if (TabAt (fFocus) != NULL)
|
||||||
TabAt(fFocus)->MakeFocus(false);
|
TabAt(fFocus)->MakeFocus(false);
|
||||||
Invalidate(TabFrame(fFocus));
|
Invalidate(TabFrame(fFocus));
|
||||||
}
|
}
|
||||||
if(TabAt(tab) != NULL){
|
if (TabAt(tab) != NULL){
|
||||||
TabAt(tab)->MakeFocus(true);
|
TabAt(tab)->MakeFocus(true);
|
||||||
Invalidate(TabFrame(tab));
|
Invalidate(TabFrame(tab));
|
||||||
fFocus = tab;
|
fFocus = tab;
|
||||||
@@ -977,7 +977,7 @@ BTabView::RemoveTab(int32 index)
|
|||||||
if (index <= fSelection && fSelection != 0)
|
if (index <= fSelection && fSelection != 0)
|
||||||
fSelection--;
|
fSelection--;
|
||||||
|
|
||||||
if(CountTabs() == 0)
|
if (CountTabs() == 0)
|
||||||
fFocus = -1;
|
fFocus = -1;
|
||||||
else
|
else
|
||||||
Select(fSelection);
|
Select(fSelection);
|
||||||
|
|||||||
Reference in New Issue
Block a user