Opened 20 months ago

Closed 20 months ago

Last modified 20 months 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
Has a Patch: yes 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 20 months ago.
left - new, right - current
0003-BTabView-implement-drawing-tabs-on-different-borders.patch (16.4 KB) - added by KapiX 20 months ago.
screenshot3.png (37.3 KB) - added by KapiX 20 months ago.
Tabs on all sides
0001-BTabView-cleanup-draw-function.patch (5.2 KB) - added by KapiX 20 months ago.
0002-BTabView-remove-dead-code.patch (1.5 KB) - added by KapiX 20 months ago.
0003-BTabView-implement-drawing-tabs-on-all-sides.patch (16.4 KB) - added by KapiX 20 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 20 months ago by KapiX

Has a Patch: set

Changed 20 months ago by KapiX

Attachment: screenshot1_cropped.png added

left - new, right - current

Changed 20 months ago by KapiX

Attachment: screenshot3.png added

Tabs on all sides

Changed 20 months ago by KapiX

Changed 20 months ago by KapiX

comment:2 Changed 20 months ago by pulkomandy

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 Changed 20 months ago by KapiX

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

comment:4 Changed 20 months ago by pulkomandy

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 Changed 20 months ago by pulkomandy

Resolution: fixed
Status: newclosed

comment:6 Changed 20 months ago by KapiX

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.