Reputation: 1808
Is it possible in Gtk+ to have an add-tab button inline with the tabs in a notebook, ala Opera or Google Chrome? I do know that Opera uses Qt and Chrome uses custom tabs, but is it possible in pure Gtk+?
Upvotes: 1
Views: 1650
Reputation: 25121
Well, if it is not possible, there is a simple workaround:
Upvotes: 3
Reputation: 41098
Sure. Check out the class BrandedNotebook at line 1384 of this file.
Unfortunately Gtk+ doesn't give you a "nice" way to do this, but you should be able to determine the amount of space available, and use it as you wish. In the case of BrandedNotebook, a pixbuf is drawn in the space, and mouse clicks are handled within the coordinates of the pixbuf.
Upvotes: 2