use GtkToolItem in toolbars
This commit is contained in:
parent
495e90e6a9
commit
95809d79f5
|
|
@ -41,6 +41,9 @@ void button_connect_callback( GtkButton* button, const Callback& callback ){
|
|||
g_signal_connect_closure( G_OBJECT( button ), "clicked", create_cclosure( G_CALLBACK( clicked_closure_callback ), callback ), FALSE );
|
||||
#endif
|
||||
}
|
||||
void button_connect_callback( GtkToolButton* button, const Callback& callback ){
|
||||
g_signal_connect_swapped( G_OBJECT( button ), "clicked", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
|
||||
}
|
||||
|
||||
guint toggle_button_connect_callback( GtkToggleButton* button, const Callback& callback ){
|
||||
#if 1
|
||||
|
|
@ -51,6 +54,11 @@ guint toggle_button_connect_callback( GtkToggleButton* button, const Callback& c
|
|||
g_object_set_data( G_OBJECT( button ), "handler", gint_to_pointer( handler ) );
|
||||
return handler;
|
||||
}
|
||||
guint toggle_button_connect_callback( GtkToggleToolButton* button, const Callback& callback ){
|
||||
guint handler = g_signal_connect_swapped( G_OBJECT( button ), "toggled", G_CALLBACK( callback.getThunk() ), callback.getEnvironment() );
|
||||
g_object_set_data( G_OBJECT( button ), "handler", gint_to_pointer( handler ) );
|
||||
return handler;
|
||||
}
|
||||
|
||||
void button_set_icon( GtkButton* button, const char* icon ){
|
||||
GtkImage* image = new_local_image( icon );
|
||||
|
|
@ -69,6 +77,12 @@ void toggle_button_set_active_no_signal( GtkToggleButton* button, gboolean activ
|
|||
gtk_toggle_button_set_active( button, active );
|
||||
g_signal_handler_unblock( G_OBJECT( button ), handler_id );
|
||||
}
|
||||
void toggle_button_set_active_no_signal( GtkToggleToolButton* button, gboolean active ){
|
||||
guint handler_id = gpointer_to_int( g_object_get_data( G_OBJECT( button ), "handler" ) );
|
||||
g_signal_handler_block( G_OBJECT( button ), handler_id );
|
||||
gtk_toggle_tool_button_set_active( button, active );
|
||||
g_signal_handler_unblock( G_OBJECT( button ), handler_id );
|
||||
}
|
||||
|
||||
|
||||
void radio_button_print_state( GtkRadioButton* button ){
|
||||
|
|
|
|||
|
|
@ -25,17 +25,22 @@
|
|||
#include "generic/callbackfwd.h"
|
||||
|
||||
typedef struct _GtkButton GtkButton;
|
||||
typedef struct _GtkToolButton GtkToolButton;
|
||||
typedef struct _GtkToggleButton GtkToggleButton;
|
||||
typedef struct _GtkToggleToolButton GtkToggleToolButton;
|
||||
typedef struct _GtkRadioButton GtkRadioButton;
|
||||
typedef int gint;
|
||||
typedef gint gboolean;
|
||||
typedef unsigned int guint;
|
||||
|
||||
void button_connect_callback( GtkButton* button, const Callback& callback );
|
||||
void button_connect_callback( GtkToolButton* button, const Callback& callback );
|
||||
guint toggle_button_connect_callback( GtkToggleButton* button, const Callback& callback );
|
||||
guint toggle_button_connect_callback( GtkToggleToolButton* button, const Callback& callback );
|
||||
|
||||
void button_set_icon( GtkButton* button, const char* icon );
|
||||
void toggle_button_set_active_no_signal( GtkToggleButton* item, gboolean active );
|
||||
void toggle_button_set_active_no_signal( GtkToggleToolButton* item, gboolean active );
|
||||
|
||||
void radio_button_set_active( GtkRadioButton* radio, int index );
|
||||
void radio_button_set_active_no_signal( GtkRadioButton* radio, int index );
|
||||
|
|
|
|||
|
|
@ -27,51 +27,61 @@
|
|||
|
||||
#include "accelerator.h"
|
||||
#include "button.h"
|
||||
#include "image.h"
|
||||
#include "closure.h"
|
||||
#include "pointer.h"
|
||||
|
||||
|
||||
GtkToolbar* toolbar_new(){
|
||||
GtkToolbar* toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
gtk_orientable_set_orientation( GTK_ORIENTABLE( toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||
gtk_toolbar_set_style( toolbar, GTK_TOOLBAR_ICONS );
|
||||
gtk_toolbar_set_show_arrow( toolbar, FALSE );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
return toolbar;
|
||||
}
|
||||
|
||||
void toolbar_append_space( GtkToolbar* toolbar ){
|
||||
GtkToolItem* space = gtk_separator_tool_item_new();
|
||||
gtk_widget_show( GTK_WIDGET( space ) );
|
||||
gtk_toolbar_insert( toolbar, space, -1 );
|
||||
}
|
||||
|
||||
void toolbar_append( GtkToolbar* toolbar, GtkButton* button, const char* description ){
|
||||
gtk_widget_show( GTK_WIDGET( button ) );
|
||||
gtk_button_set_relief( button, GTK_RELIEF_NONE );
|
||||
gtk_widget_set_can_focus( GTK_WIDGET( button ), FALSE );
|
||||
gtk_widget_set_can_default( GTK_WIDGET( button ), FALSE );
|
||||
gtk_toolbar_append_element( toolbar, GTK_TOOLBAR_CHILD_WIDGET, GTK_WIDGET( button ), "", description, "", 0, 0, 0 );
|
||||
void toolbar_append( GtkToolbar* toolbar, GtkToolItem* button, const char* description ){
|
||||
gtk_widget_show_all( GTK_WIDGET( button ) );
|
||||
gtk_tool_item_set_tooltip_text( button, description );
|
||||
// gtk_button_set_relief( button, GTK_RELIEF_NONE );
|
||||
// gtk_widget_set_can_focus( GTK_WIDGET( button ), FALSE );
|
||||
// gtk_widget_set_can_default( GTK_WIDGET( button ), FALSE );
|
||||
gtk_toolbar_insert( toolbar, button, -1 );
|
||||
}
|
||||
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ){
|
||||
GtkButton* button = GTK_BUTTON( gtk_button_new() );
|
||||
button_set_icon( button, icon );
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ){
|
||||
GtkToolButton* button = GTK_TOOL_BUTTON( gtk_tool_button_new( GTK_WIDGET( new_local_image( icon ) ), nullptr ) );
|
||||
button_connect_callback( button, callback );
|
||||
toolbar_append( toolbar, button, description );
|
||||
toolbar_append( toolbar, GTK_TOOL_ITEM( button ), description );
|
||||
return button;
|
||||
}
|
||||
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ){
|
||||
GtkToggleButton* button = GTK_TOGGLE_BUTTON( gtk_toggle_button_new() );
|
||||
button_set_icon( GTK_BUTTON( button ), icon );
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ){
|
||||
GtkToggleToolButton* button = GTK_TOGGLE_TOOL_BUTTON( gtk_toggle_tool_button_new() );
|
||||
gtk_tool_button_set_icon_widget( GTK_TOOL_BUTTON( button ), GTK_WIDGET( new_local_image( icon ) ) );
|
||||
toggle_button_connect_callback( button, callback );
|
||||
toolbar_append( toolbar, GTK_BUTTON( button ), description );
|
||||
toolbar_append( toolbar, GTK_TOOL_ITEM( button ), description );
|
||||
return button;
|
||||
}
|
||||
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Command& command ){
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Command& command ){
|
||||
return toolbar_append_button( toolbar, description, icon, command.m_callback );
|
||||
}
|
||||
|
||||
void toggle_button_set_active_callback( GtkToggleButton& button, bool active ){
|
||||
void toggle_button_set_active_callback( GtkToggleToolButton& button, bool active ){
|
||||
toggle_button_set_active_no_signal( &button, active );
|
||||
}
|
||||
typedef ReferenceCaller1<GtkToggleButton, bool, toggle_button_set_active_callback> ToggleButtonSetActiveCaller;
|
||||
typedef ReferenceCaller1<GtkToggleToolButton, bool, toggle_button_set_active_callback> ToggleButtonSetActiveCaller;
|
||||
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Toggle& toggle ){
|
||||
GtkToggleButton* button = toolbar_append_toggle_button( toolbar, description, icon, toggle.m_command.m_callback );
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Toggle& toggle ){
|
||||
GtkToggleToolButton* button = toolbar_append_toggle_button( toolbar, description, icon, toggle.m_command.m_callback );
|
||||
toggle.m_exportCallback( ToggleButtonSetActiveCaller( *button ) );
|
||||
return button;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,16 +24,19 @@
|
|||
|
||||
#include "generic/callbackfwd.h"
|
||||
|
||||
typedef struct _GtkButton GtkButton;
|
||||
typedef struct _GtkToggleButton GtkToggleButton;
|
||||
typedef struct _GtkToolItem GtkToolItem;
|
||||
typedef struct _GtkToolButton GtkToolButton;
|
||||
typedef struct _GtkToggleToolButton GtkToggleToolButton;
|
||||
typedef struct _GtkToolbar GtkToolbar;
|
||||
class Command;
|
||||
class Toggle;
|
||||
|
||||
GtkToolbar* toolbar_new();
|
||||
void toolbar_append_space( GtkToolbar* toolbar );
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback );
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Command& command );
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback );
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Toggle& toggle );
|
||||
void toolbar_append( GtkToolbar* toolbar, GtkToolItem* button, const char* description );
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback );
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Command& command );
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback );
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Toggle& toggle );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -213,13 +213,10 @@ gboolean Hide_button_press( GtkWidget *widget, GdkEventButton *event, gpointer d
|
|||
}
|
||||
|
||||
GtkToolbar* create_filter_toolbar(){
|
||||
GtkToolbar* toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
gtk_toolbar_set_style( toolbar, GTK_TOOLBAR_ICONS );
|
||||
// gtk_toolbar_set_show_arrow( toolbar, TRUE );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
GtkToolbar* toolbar = toolbar_new();
|
||||
g_signal_connect( G_OBJECT( toolbar ), "enter_notify_event", G_CALLBACK( ToggleActions0 ), 0 );
|
||||
|
||||
GtkToggleButton* button;
|
||||
GtkToggleToolButton* button;
|
||||
|
||||
toolbar_append_toggle_button( toolbar, "World (ALT + 1)", "f-world.png", "FilterWorldBrushes" );
|
||||
|
||||
|
|
|
|||
|
|
@ -92,11 +92,11 @@ GtkMenuItem* create_menu_item_with_mnemonic( GtkMenu* menu, const char *mnemonic
|
|||
return create_menu_item_with_mnemonic( menu, mnemonic, command );
|
||||
}
|
||||
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName ){
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName ){
|
||||
return toolbar_append_button( toolbar, description, icon, GlobalCommands_find( commandName ) );
|
||||
}
|
||||
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName ){
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName ){
|
||||
return toolbar_append_toggle_button( toolbar, description, icon, GlobalToggles_find( commandName ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ GtkMenuItem* create_menu_item_with_mnemonic( GtkMenu *menu, const char *mnemonic
|
|||
// this also sets up the shortcut using command_connect_accelerator
|
||||
GtkCheckMenuItem* create_check_menu_item_with_mnemonic( GtkMenu* menu, const char* mnemonic, const char* commandName );
|
||||
|
||||
typedef struct _GtkButton GtkButton;
|
||||
typedef struct _GtkToggleButton GtkToggleButton;
|
||||
typedef struct _GtkToolButton GtkToolButton;
|
||||
typedef struct _GtkToggleToolButton GtkToggleToolButton;
|
||||
typedef struct _GtkToolbar GtkToolbar;
|
||||
|
||||
// this DOES NOT set up the shortcut using command_connect_accelerator
|
||||
GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName );
|
||||
GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName );
|
||||
// this DOES NOT set up the shortcut using command_connect_accelerator
|
||||
GtkToggleButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName );
|
||||
GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const char* commandName );
|
||||
|
||||
typedef struct _GtkWidget GtkWidget;
|
||||
template<typename Element> class BasicVector3;
|
||||
|
|
|
|||
|
|
@ -2566,11 +2566,7 @@ void Manipulators_constructToolbar( GtkToolbar* toolbar ){
|
|||
}
|
||||
|
||||
GtkToolbar* create_main_toolbar( MainFrame::EViewStyle style ){
|
||||
GtkToolbar* toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
gtk_orientable_set_orientation( GTK_ORIENTABLE( toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||
gtk_toolbar_set_style( toolbar, GTK_TOOLBAR_ICONS );
|
||||
// gtk_toolbar_set_show_arrow( toolbar, TRUE );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
GtkToolbar* toolbar = toolbar_new();
|
||||
|
||||
File_constructToolbar( toolbar );
|
||||
toolbar_append_space( toolbar );
|
||||
|
|
@ -2618,7 +2614,7 @@ GtkToolbar* create_main_toolbar( MainFrame::EViewStyle style ){
|
|||
}
|
||||
|
||||
// TODO: call light inspector
|
||||
//GtkButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.png", "ToggleLightInspector");
|
||||
//GtkToolButton* g_view_lightinspector_button = toolbar_append_button(toolbar, "Light Inspector", "lightinspector.png", "ToggleLightInspector");
|
||||
|
||||
toolbar_append_space( toolbar );
|
||||
toolbar_append_button( toolbar, "Refresh Models", "refresh_models.png", "RefreshReferences" );
|
||||
|
|
|
|||
|
|
@ -1273,12 +1273,11 @@ GtkWidget* ModelBrowser_constructWindow( GtkWindow* toplevel ){
|
|||
gtk_widget_show( vbox );
|
||||
|
||||
{ // menu bar
|
||||
GtkToolbar* toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
GtkToolbar* toolbar = toolbar_new();
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( toolbar ), FALSE, FALSE, 0 );
|
||||
|
||||
GtkButton* button = toolbar_append_button( toolbar, "Reload Model Folders Tree View", "texbro_refresh.png", FreeCaller<ModelBrowser_constructTree>() );
|
||||
gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
GtkToolButton* button = toolbar_append_button( toolbar, "Reload Model Folders Tree View", "texbro_refresh.png", FreeCaller<ModelBrowser_constructTree>() );
|
||||
// gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
}
|
||||
{ // TreeView
|
||||
GtkWidget* scr = gtk_scrolled_window_new( NULL, NULL );
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "stream/stringstream.h"
|
||||
#include "gtkutil/image.h"
|
||||
#include "gtkutil/container.h"
|
||||
#include "gtkutil/toolbar.h"
|
||||
|
||||
#include "mainframe.h"
|
||||
#include "plugin.h"
|
||||
|
|
@ -65,27 +66,34 @@ GtkImage* new_plugin_image( const char* filename ){
|
|||
return image_new_missing();
|
||||
}
|
||||
|
||||
inline GtkToolbarChildType gtktoolbarchildtype_for_toolbarbuttontype( IToolbarButton::EType type ){
|
||||
void toolbar_insert( GtkToolbar *toolbar, const char* icon, const char* text, const char* tooltip, IToolbarButton::EType type, GCallback callback, gpointer data ){
|
||||
switch ( type )
|
||||
{
|
||||
case IToolbarButton::eSpace:
|
||||
return GTK_TOOLBAR_CHILD_SPACE;
|
||||
toolbar_append_space( toolbar );
|
||||
return;
|
||||
case IToolbarButton::eButton:
|
||||
return GTK_TOOLBAR_CHILD_BUTTON;
|
||||
{
|
||||
GtkToolButton* button = GTK_TOOL_BUTTON( gtk_tool_button_new( GTK_WIDGET( new_plugin_image( icon ) ), text ) );
|
||||
g_signal_connect( G_OBJECT( button ), "clicked", callback, data );
|
||||
toolbar_append( toolbar, GTK_TOOL_ITEM( button ), tooltip );
|
||||
}
|
||||
return;
|
||||
case IToolbarButton::eToggleButton:
|
||||
return GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
|
||||
{
|
||||
GtkToggleToolButton* button = GTK_TOGGLE_TOOL_BUTTON( gtk_toggle_tool_button_new() );
|
||||
gtk_tool_button_set_icon_widget( GTK_TOOL_BUTTON( button ), GTK_WIDGET( new_plugin_image( icon ) ) );
|
||||
gtk_tool_button_set_label( GTK_TOOL_BUTTON( button ), text );
|
||||
g_signal_connect( G_OBJECT( button ), "toggled", callback, data );
|
||||
toolbar_append( toolbar, GTK_TOOL_ITEM( button ), tooltip );
|
||||
}
|
||||
return;
|
||||
case IToolbarButton::eRadioButton:
|
||||
return GTK_TOOLBAR_CHILD_RADIOBUTTON;
|
||||
}
|
||||
ERROR_MESSAGE( "invalid toolbar button type" );
|
||||
return (GtkToolbarChildType)0;
|
||||
}
|
||||
|
||||
void toolbar_insert( GtkToolbar *toolbar, const char* icon, const char* text, const char* tooltip, IToolbarButton::EType type, GCallback callback, gpointer data ){
|
||||
GtkWidget* widget = gtk_toolbar_append_element( toolbar, gtktoolbarchildtype_for_toolbarbuttontype( type ), 0, text, tooltip, "", GTK_WIDGET( new_plugin_image( icon ) ), callback, data );
|
||||
if( type != IToolbarButton::eSpace ){
|
||||
gtk_widget_set_can_focus( widget, FALSE );
|
||||
gtk_widget_set_can_default( widget, FALSE );
|
||||
ERROR_MESSAGE( "IToolbarButton::eRadioButton not implemented" );
|
||||
return;
|
||||
default:
|
||||
ERROR_MESSAGE( "invalid toolbar button type" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -125,17 +133,7 @@ void PluginToolbar_clear(){
|
|||
}
|
||||
|
||||
GtkToolbar* create_plugin_toolbar(){
|
||||
GtkToolbar *toolbar;
|
||||
|
||||
toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
gtk_orientable_set_orientation( GTK_ORIENTABLE( toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||
gtk_toolbar_set_style( toolbar, GTK_TOOLBAR_ICONS );
|
||||
// gtk_toolbar_set_show_arrow( toolbar, TRUE );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
|
||||
g_plugin_toolbar = toolbar;
|
||||
|
||||
g_plugin_toolbar = toolbar_new();
|
||||
PluginToolbar_populate();
|
||||
|
||||
return toolbar;
|
||||
return g_plugin_toolbar;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2082,22 +2082,21 @@ GtkWidget* TextureBrowser_constructWindow( GtkWindow* toplevel ){
|
|||
TextureBrowser_constructViewMenu( menu_view );
|
||||
gtk_menu_set_title( menu_view, "View" );
|
||||
|
||||
toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
|
||||
toolbar = toolbar_new();
|
||||
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( toolbar ), FALSE, FALSE, 0 );
|
||||
|
||||
//view menu button
|
||||
GtkButton* button = toolbar_append_button( toolbar, "View", "texbro_view.png", PointerCaller<GtkMenu, Popup_View_Menu>( menu_view ) );
|
||||
gtk_widget_set_size_request( GTK_WIDGET( button ), 24, 24 ); // 24 is minimal here for non scissored icon with any gtk theme
|
||||
GtkToolButton* button = toolbar_append_button( toolbar, "View", "texbro_view.png", PointerCaller<GtkMenu, Popup_View_Menu>( menu_view ) );
|
||||
// gtk_widget_set_size_request( GTK_WIDGET( button ), 24, 24 ); // 24 is minimal here for non scissored icon with any gtk theme
|
||||
|
||||
//show detached menu over floating tex bro
|
||||
gtk_menu_attach_to_widget( menu_view, GTK_WIDGET( button ), NULL );
|
||||
|
||||
button = toolbar_append_button( toolbar, "Find / Replace...", "texbro_gtk-find-and-replace.png", "FindReplaceTextures" );
|
||||
gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
// gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
|
||||
button = toolbar_append_button( toolbar, "Flush & Reload Shaders", "texbro_refresh.png", "RefreshShaders" );
|
||||
gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
gtk_widget_show( GTK_WIDGET( toolbar ) );
|
||||
// gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
}
|
||||
{ // filter entry
|
||||
GtkWidget* entry = g_TextureBrowser.m_filter_entry = gtk_entry_new();
|
||||
|
|
@ -2177,8 +2176,8 @@ GtkWidget* TextureBrowser_constructWindow( GtkWindow* toplevel ){
|
|||
gtk_menu_set_title( menu_tags, "Tags" );
|
||||
TextureBrowser_constructTagsMenu( menu_tags );
|
||||
|
||||
GtkButton* button = toolbar_append_button( toolbar, "Tags", "texbro_tags.png", PointerCaller<GtkMenu, Popup_View_Menu>( menu_tags ) );
|
||||
gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
GtkToolButton* button = toolbar_append_button( toolbar, "Tags", "texbro_tags.png", PointerCaller<GtkMenu, Popup_View_Menu>( menu_tags ) );
|
||||
// gtk_widget_set_size_request( GTK_WIDGET( button ), 22, 22 );
|
||||
|
||||
//show detached menu over floating tex bro and main wnd...
|
||||
gtk_menu_attach_to_widget( menu_tags, GTK_WIDGET( button ), NULL );
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user