Skip to content

Commit

Permalink
Rename functions to differentiate them
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Nov 13, 2024
1 parent 0fb68c3 commit df9ac5a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
32 changes: 28 additions & 4 deletions include/guisan/widget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,34 @@ namespace gcn
* @since 0.1.0
*/
static void setGlobalFont(Font* font);
static void setGlobalBaseColor(Color color);
static void setGlobalForegroundColor(Color color);
static void setGlobalBackgroundColor(Color color);
static void setGlobalSelectionColor(Color color);

/**
* Set the base color for all widgets
*
* @param color The color to use
*/
static void setWidgetsBaseColor(Color color);

/**
* Set the foreground color for all widgets
*
* @param color The color to use
*/
static void setWidgetsForegroundColor(Color color);

/**
* Set the background color for all widgets
*
* @param color The color to use
*/
static void setWidgetsBackgroundColor(Color color);

/**
* Set the selection color for all widgets
*
* @param color The color to use
*/
static void setWidgetsSelectionColor(Color color);

/**
* Sets the font for the widget. If nullptr is passed, the global font
Expand Down
8 changes: 4 additions & 4 deletions src/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,31 +513,31 @@ namespace gcn
}
}

void Widget::setGlobalBaseColor(Color color)
void Widget::setWidgetsBaseColor(Color color)
{
for (Widget* w : mWidgetInstances)
{
w->setBaseColor(color);
}
}

void Widget::setGlobalForegroundColor(Color color)
void Widget::setWidgetsForegroundColor(Color color)
{
for (Widget* w : mWidgetInstances)
{
w->setForegroundColor(color);
}
}

void Widget::setGlobalBackgroundColor(Color color)
void Widget::setWidgetsBackgroundColor(Color color)
{
for (Widget* w : mWidgetInstances)
{
w->setBackgroundColor(color);
}
}

void Widget::setGlobalSelectionColor(Color color)
void Widget::setWidgetsSelectionColor(Color color)
{
for (Widget* w : mWidgetInstances)
{
Expand Down

0 comments on commit df9ac5a

Please sign in to comment.