[SOLVED] ToolBarSeparator()

Linux specific forum
Joubarbe
Enthusiast
Enthusiast
Posts: 555
Joined: Wed Sep 18, 2013 11:54 am
Location: France

[SOLVED] ToolBarSeparator()

Post by Joubarbe »

Hey (again !)

Code: Select all

OpenWindow(0, 100, 100, 320, 200, "")

CreateToolBar(0, WindowID(0))
ToolBarStandardButton(0, #PB_ToolBarIcon_New)
ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
ToolBarSeparator()
ToolBarStandardButton(2, #PB_ToolBarIcon_Help)

Repeat
  
  event = WaitWindowEvent()
    
Until event = #PB_Event_CloseWindow
The separator does not show. There's no vertical bar, just a blank space. Note that the separator does show in other applications, such as gedit.

(Linux Mint 17.2)
Last edited by Joubarbe on Sat Aug 29, 2015 7:33 am, edited 2 times in total.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ToolBarSeparator()

Post by heartbone »

UBUNTU 14.04 x86 PB 5.22
I see the separator bar.
Keep it BASIC.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: ToolBarSeparator()

Post by davido »

@Joubarbe,

Are you working on a Mac?

Mac OSX is not supported by PureBasic, for ToolbarSeparator().
See manual: You can click on CreateToolBar in your code and press F1 to see.
DE AA EB
Joubarbe
Enthusiast
Enthusiast
Posts: 555
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Re: ToolBarSeparator()

Post by Joubarbe »

@davido : this is the Linux topic, so no :) Mint 17.2 (added that to the OP).

Nonetheless, there's nothing in the help file that indicates that the separator is not OSX compatible. All OS are said to be supported.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: ToolBarSeparator()

Post by Trond »

This depends on the GTK 2 theme. Gedit uses GTK 3, which has separate themes.
Joubarbe
Enthusiast
Enthusiast
Posts: 555
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Re: ToolBarSeparator()

Post by Joubarbe »

Yep, that's what I figured. And I can't seem to make gtk3 works, so that's either a gtk2 bug, or a PB one.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: ToolBarSeparator()

Post by davido »

@Joubarbe,
My apologies. :oops:
DE AA EB
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

Re: ToolBarSeparator()

Post by Oma »

Hi Joubarbe.

I don't have Mint 17.2 to test it, but on 17.1 it depends on the choosed theme:
With 'Mint-X-????' on the controls, there's only a small spaces between the buttons,
with e.g. 'Adwaita'-theme the line appears in the toolbar.

There's API-command ...
gtk_separator_tool_item_set_draw (GtkSeparatorToolItem *item, gboolean draw)
which switches between a line or space.
And here's the real problem. There's no simple way to get the *item (widget-adress of toolbar-element) from PureBasic to switch to the 'line'-mode. The better way would be, that PB-commands like ToolBarSeparator() with a empty 'Return', would return the widget-adress to get API-access to toolbar-elements.

Regards, Charly
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de
Joubarbe
Enthusiast
Enthusiast
Posts: 555
Joined: Wed Sep 18, 2013 11:54 am
Location: France

Re: ToolBarSeparator()

Post by Joubarbe »

Thanks a lot Oma for this clarification. Indeed, when changing the theme ("controls"), it works.

Not a huge problem then :)
Post Reply