Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13673 closed enhancement (fixed)

BTabView tabs side parameter

Reported by: KapiX Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #7330
Platform: All

Description

This is tracking ticket for changes related to adding tabs side parameter to BTabView.

I took a look at BTabView code and decided to clean it up a bit first.

Patch and screenshot attached.

Attachments (6)

screenshot1_cropped.png (20.6 KB ) - added by KapiX 7 years ago.
left - new, right - current
0003-BTabView-implement-drawing-tabs-on-different-borders.patch (16.4 KB ) - added by KapiX 7 years ago.
screenshot3.png (37.3 KB ) - added by KapiX 7 years ago.
Tabs on all sides
0001-BTabView-cleanup-draw-function.patch (5.2 KB ) - added by KapiX 7 years ago.
0002-BTabView-remove-dead-code.patch (1.5 KB ) - added by KapiX 7 years ago.
0003-BTabView-implement-drawing-tabs-on-all-sides.patch (16.4 KB ) - added by KapiX 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by KapiX, 7 years ago

patch: 01

by KapiX, 7 years ago

Attachment: screenshot1_cropped.png added

left - new, right - current

by KapiX, 7 years ago

Attachment: screenshot3.png added

Tabs on all sides

comment:2 by pulkomandy, 7 years ago

cc1plus: warnings being treated as errors
/Git/haiku/haiku/src/kits/interface/TabView.cpp: In method `void BTab::DrawLabel(BView *, BRect)':
/Git/haiku/haiku/src/kits/interface/TabView.cpp:278: warning: `float rotation' might be used uninitialized in this function
/Git/haiku/haiku/src/kits/interface/TabView.cpp: In method `void BTab::DrawTab(BView *, BRect, tab_position, bool = true)':
/Git/haiku/haiku/src/kits/interface/TabView.cpp:321: warning: `uint32 borders' might be used uninitialized in this function
/Git/haiku/haiku/src/kits/interface/TabView.cpp: In method `class BRect BTabView::DrawTabs()':
/Git/haiku/haiku/src/kits/interface/TabView.cpp:886: warning: `uint32 borders' might be used uninitialized in this function

comment:3 by KapiX, 7 years ago

It never showed me those. Not even warnings. I found out why: I had DEBUG set for kits directory. Bug?

comment:4 by pulkomandy, 7 years ago

Yes, I think gcc2 is not noticing that the if/switches in fact cover all possible cases.

Applied in hrev51368 and I forced initialization of the variables.

comment:5 by pulkomandy, 7 years ago

Resolution: fixed
Status: newclosed

comment:6 by KapiX, 7 years ago

I mean a bug in build system. I have built the code with gcc2 except I had DEBUG enabled and it didn't emit any warnings. When I disabled DEBUG it suddenly fails with errors above.

Note: See TracTickets for help on using tickets.