Fixed the problem with Etch support for 16x16 icons
This commit is contained in:
parent
7b52ff247e
commit
b2fad8d9a5
3 changed files with 23 additions and 12 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
* *****************************************************/
|
* *****************************************************/
|
||||||
|
|
||||||
#include "track.hpp"
|
#include "track.hpp"
|
||||||
|
#include "../../window-manager.hpp"
|
||||||
|
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ Track::Track() :
|
||||||
buttonBar.append(lockButton);
|
buttonBar.append(lockButton);
|
||||||
|
|
||||||
buttonBar.set_toolbar_style(TOOLBAR_ICONS);
|
buttonBar.set_toolbar_style(TOOLBAR_ICONS);
|
||||||
// buttonBar.set_icon_size(ICON_SIZE_MENU); /////TODO: commented out because it makes compile fail on Etch based system
|
buttonBar.set_icon_size(WindowManager::MenuIconSize);
|
||||||
|
|
||||||
|
|
||||||
headerWidget.pack_start(titleBox, PACK_SHRINK);
|
headerWidget.pack_start(titleBox, PACK_SHRINK);
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,12 @@ using namespace Glib;
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
|
|
||||||
IconSize WindowManager::giantIconSize = ICON_SIZE_INVALID;
|
IconSize WindowManager::GiantIconSize = ICON_SIZE_INVALID;
|
||||||
|
IconSize WindowManager::MenuIconSize = ICON_SIZE_INVALID;
|
||||||
|
|
||||||
WindowManager::WindowManager()
|
WindowManager::WindowManager()
|
||||||
{
|
{
|
||||||
register_giant_icon_size();
|
register_app_icon_sizes();
|
||||||
register_stock_items();
|
register_stock_items();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,10 +77,12 @@ WindowManager::read_style_colour_property(
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WindowManager::register_giant_icon_size()
|
WindowManager::register_app_icon_sizes()
|
||||||
{
|
{
|
||||||
if(giantIconSize == ICON_SIZE_INVALID)
|
if(GiantIconSize == ICON_SIZE_INVALID)
|
||||||
giantIconSize = IconSize::register_new ("giant", 48, 48);
|
GiantIconSize = IconSize::register_new ("giant", 48, 48);
|
||||||
|
if(MenuIconSize == ICON_SIZE_INVALID)
|
||||||
|
MenuIconSize = IconSize::register_new ("menu", 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -115,7 +118,7 @@ WindowManager::add_stock_icon_set(
|
||||||
// loaded
|
// loaded
|
||||||
bool no_icons = true;
|
bool no_icons = true;
|
||||||
no_icons &= !add_stock_icon(
|
no_icons &= !add_stock_icon(
|
||||||
icon_set, icon_name, giantIconSize, no_icons);
|
icon_set, icon_name, GiantIconSize, no_icons);
|
||||||
no_icons &= !add_stock_icon(
|
no_icons &= !add_stock_icon(
|
||||||
icon_set, icon_name, ICON_SIZE_BUTTON, no_icons);
|
icon_set, icon_name, ICON_SIZE_BUTTON, no_icons);
|
||||||
no_icons &= !add_stock_icon(
|
no_icons &= !add_stock_icon(
|
||||||
|
|
@ -123,7 +126,7 @@ WindowManager::add_stock_icon_set(
|
||||||
no_icons &= !add_stock_icon(
|
no_icons &= !add_stock_icon(
|
||||||
icon_set, icon_name, ICON_SIZE_LARGE_TOOLBAR, no_icons);
|
icon_set, icon_name, ICON_SIZE_LARGE_TOOLBAR, no_icons);
|
||||||
no_icons &= !add_stock_icon(
|
no_icons &= !add_stock_icon(
|
||||||
icon_set, icon_name, ICON_SIZE_SMALL_TOOLBAR, no_icons);
|
icon_set, icon_name, MenuIconSize, no_icons);
|
||||||
|
|
||||||
if(no_icons)
|
if(no_icons)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,9 @@ public:
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the extra large icon size.
|
* Registers the custom icon sizes.
|
||||||
**/
|
**/
|
||||||
static void register_giant_icon_size();
|
static void register_app_icon_sizes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers application stock items: icons and
|
* Registers application stock items: icons and
|
||||||
|
|
@ -118,14 +118,21 @@ private:
|
||||||
const Glib::ustring& base_dir, const Glib::ustring& icon_name,
|
const Glib::ustring& base_dir, const Glib::ustring& icon_name,
|
||||||
Gtk::IconSize size, bool wildcard);
|
Gtk::IconSize size, bool wildcard);
|
||||||
|
|
||||||
private:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The registered icon size for giant 48x48 px icons.
|
* The registered icon size for giant 48x48 px icons.
|
||||||
* @remarks This value is set to BuiltinIconSize::ICON_SIZE_INVALID
|
* @remarks This value is set to BuiltinIconSize::ICON_SIZE_INVALID
|
||||||
* until register_giant_icon_size is called.
|
* until register_giant_icon_size is called.
|
||||||
**/
|
**/
|
||||||
static Gtk::IconSize giantIconSize;
|
static Gtk::IconSize GiantIconSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The registered icon size for giant 16x16 px icons.
|
||||||
|
* @remarks This value is set to BuiltinIconSize::ICON_SIZE_INVALID
|
||||||
|
* until register_app_icon_sizes is called.
|
||||||
|
**/
|
||||||
|
static Gtk::IconSize MenuIconSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gui
|
} // namespace gui
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue