UiStyle: fix naming

This commit is contained in:
Fischlurch 2019-07-13 14:34:55 +02:00
parent d5cbeab2d8
commit dde3778cad
7 changed files with 30 additions and 31 deletions

View file

@ -55,7 +55,7 @@ namespace ctrl {
using Gtk::IconSize;
using Gtk::IconFactory;
using workspace::UIStyle;
using workspace::UiStyle;
@ -106,7 +106,7 @@ namespace ctrl {
: ApplicationBase()
, Gtk::UIManager()
, globals_{new GlobalCtx{bus, *this}}
, uiStyle_{new UIStyle{}}
, uiStyle_{new UiStyle{}}
, actions_{new Actions{*globals_}}
, facade_{} // note: not activated yet
{

View file

@ -96,10 +96,10 @@ namespace ctrl {
: public ApplicationBase
, public Gtk::UIManager
{
using UIStyle = workspace::UIStyle;
using UiStyle = workspace::UiStyle;
unique_ptr<GlobalCtx> globals_;
unique_ptr<UIStyle> uiStyle_;
unique_ptr<UiStyle> uiStyle_;
unique_ptr<Actions> actions_;
unique_ptr<Facade> facade_;

View file

@ -531,14 +531,14 @@ TimelineBody::register_styles() const
void
TimelineBody::read_styles()
{
backgroundColour = workspace::UIStyle::readStyleColourProperty(
backgroundColour = workspace::UiStyle::readStyleColourProperty(
*this, "background", 0, 0, 0);
selectionColour = workspace::UIStyle::readStyleColourProperty(
selectionColour = workspace::UiStyle::readStyleColourProperty(
*this, "selection", 0, 0, 0);
get_style_property("selection_alpha", selectionAlpha);
playbackPointColour = workspace::UIStyle::readStyleColourProperty(
playbackPointColour = workspace::UiStyle::readStyleColourProperty(
*this, "playback_point", 0, 0, 0);
}

View file

@ -691,12 +691,12 @@ namespace timeline {
get_style_property("mouse_chevron_size", mouseChevronSize);
get_style_property("selection_chevron_size", selectionChevronSize);
playbackPointColour = workspace::UIStyle::readStyleColourProperty(
playbackPointColour = workspace::UiStyle::readStyleColourProperty(
*this, "playback_point_colour", 0, 0, 0);
get_style_property("playback_point_alpha", playbackPointAlpha);
get_style_property("playback_point_size", playbackPointSize);
playbackPeriodArrowColour =workspace::UIStyle::readStyleColourProperty(
playbackPeriodArrowColour =workspace::UiStyle::readStyleColourProperty(
*this, "playback_period_arrow_colour", 0, 0, 0);
get_style_property("playback_period_arrow_alpha",
playbackPeriodArrowAlpha);

View file

@ -54,8 +54,8 @@ namespace timeline {
, expanded(true)
, expandDirection(None)
, headerWidget(*this)
, enableButton(Gtk::StockID("track_enabled"), workspace::UIStyle::MenuIconSize)
, lockButton(Gtk::StockID("track_unlocked"), workspace::UIStyle::MenuIconSize)
, enableButton(Gtk::StockID("track_enabled"), workspace::UiStyle::MenuIconSize)
, lockButton(Gtk::StockID("track_unlocked"), workspace::UiStyle::MenuIconSize)
{
REQUIRE(modelTrack);
@ -327,12 +327,12 @@ namespace timeline {
if (modelTrack->getEnabled())
{
enableButton.setStockID (Gtk::StockID("track_enabled"), workspace::UIStyle::MenuIconSize);
enableButton.setStockID (Gtk::StockID("track_enabled"), workspace::UiStyle::MenuIconSize);
enableButton.set_tooltip_text(_("Disable track"));
}
else
{
enableButton.setStockID (Gtk::StockID("track_disabled"), workspace::UIStyle::MenuIconSize);
enableButton.setStockID (Gtk::StockID("track_disabled"), workspace::UiStyle::MenuIconSize);
enableButton.set_tooltip_text(_("Enable track"));
}
}
@ -345,12 +345,12 @@ namespace timeline {
if (modelTrack->getLocked())
{
lockButton.setStockID (Gtk::StockID("track_locked"), workspace::UIStyle::MenuIconSize);
lockButton.setStockID (Gtk::StockID("track_locked"), workspace::UiStyle::MenuIconSize);
lockButton.set_tooltip_text(_("Unlock track"));
}
else
{
lockButton.setStockID (Gtk::StockID("track_unlocked"), workspace::UIStyle::MenuIconSize);
lockButton.setStockID (Gtk::StockID("track_unlocked"), workspace::UiStyle::MenuIconSize);
lockButton.set_tooltip_text(_("Lock track"));
}
}

View file

@ -50,8 +50,8 @@ namespace workspace {
namespace fsys = boost::filesystem;
IconSize UIStyle::GiantIconSize = Gtk::ICON_SIZE_INVALID;
IconSize UIStyle::MenuIconSize = Gtk::ICON_SIZE_INVALID;
IconSize UiStyle::GiantIconSize = Gtk::ICON_SIZE_INVALID;
IconSize UiStyle::MenuIconSize = Gtk::ICON_SIZE_INVALID;
@ -64,7 +64,7 @@ namespace workspace {
*
* @see lumiera::Config
*/
UIStyle::UIStyle()
UiStyle::UiStyle()
: Gtk::UIManager()
, iconSearchPath_{Config::get (KEY_ICON_PATH)}
, resourceSerachPath_{Config::get (KEY_UIRES_PATH)}
@ -80,7 +80,7 @@ namespace workspace {
void
UIStyle::setTheme (string const& stylesheetName)
UiStyle::setTheme (string const& stylesheetName)
{
auto screen = Gdk::Screen::get_default();
auto css_provider = Gtk::CssProvider::create();
@ -102,7 +102,7 @@ namespace workspace {
Cairo::RefPtr<Cairo::SolidPattern>
UIStyle::readStyleColourProperty (Gtk::Widget& widget
UiStyle::readStyleColourProperty (Gtk::Widget& widget
,const gchar * property_name
,guint16 red, guint16 green, guint16 blue)
{
@ -133,7 +133,7 @@ namespace workspace {
void
UIStyle::registerAppIconSizes()
UiStyle::registerAppIconSizes()
{
if(GiantIconSize == Gtk::ICON_SIZE_INVALID)
GiantIconSize = IconSize::register_new ("giant", 48, 48);
@ -147,7 +147,7 @@ namespace workspace {
* icons and labels associated with IDs
*/
void
UIStyle::registerStockItems()
UiStyle::registerStockItems()
{
Glib::RefPtr<IconFactory> factory = Gtk::IconFactory::create();
@ -172,7 +172,7 @@ namespace workspace {
bool
UIStyle::addStockIconSet (Glib::RefPtr<IconFactory> const& factory
UiStyle::addStockIconSet (Glib::RefPtr<IconFactory> const& factory
,cuString& icon_name
,cuString& id
,cuString& label)
@ -208,7 +208,7 @@ namespace workspace {
bool
UIStyle::addStockIcon (Glib::RefPtr<Gtk::IconSet> const& icon_set
UiStyle::addStockIcon (Glib::RefPtr<Gtk::IconSet> const& icon_set
,cuString& icon_name
,Gtk::IconSize size
,bool wildcard)
@ -232,7 +232,7 @@ namespace workspace {
bool
UIStyle::addThemeIconSource (Glib::RefPtr<Gtk::IconSet> const& icon_set
UiStyle::addThemeIconSource (Glib::RefPtr<Gtk::IconSet> const& icon_set
,cuString& icon_name
,Gtk::IconSize size
,bool wildcard)
@ -258,7 +258,7 @@ namespace workspace {
bool
UIStyle::addNonThemeIconSource (Glib::RefPtr<Gtk::IconSet> const& icon_set
UiStyle::addNonThemeIconSource (Glib::RefPtr<Gtk::IconSet> const& icon_set
,cuString& base_dir
,cuString& icon_name
,Gtk::IconSize size
@ -278,7 +278,7 @@ namespace workspace {
bool
UIStyle::addStockIconFromPath (string path
UiStyle::addStockIconFromPath (string path
,Glib::RefPtr<Gtk::IconSet> const& icon_set
,Gtk::IconSize size
,bool wildcard)

View file

@ -62,7 +62,7 @@ namespace workspace {
* further global services to create workspace windows, to bind
* menu / command actions and to enter the top-level model parts.
*/
class UIStyle
class UiStyle
: public Gtk::UIManager
, util::NonCopyable
{
@ -88,17 +88,16 @@ namespace workspace {
public:
/**
* Set up a coherent theming and styling for the application.
* Based on the Gtk::UIManager, the UIStyle service allows to access some
* Based on the Gtk::UIManager, the UiStyle service allows to access some
* style related resources, but mostly its task is to configure the GTK toolkit
* appropriately during startup.
*/
UIStyle();
UiStyle();
/**
* Sets the theme to use for the Lumiera GUI.
* @param stylesheetName GTK CSS stylesheet to load from the resourceSearchPath_
* @throw error::Config if this stylesheet can't be resolved on the searchpath
* @see #init
* @see lumiera::Config
*/
void setTheme (string const& stylesheetName);