Change button name
This commit is contained in:
parent
574afcaf74
commit
65e75523bb
3 changed files with 11 additions and 11 deletions
|
|
@ -373,11 +373,11 @@ void Editor::Impl::createFrameContents()
|
||||||
typedef CTextButton Button;
|
typedef CTextButton Button;
|
||||||
#endif
|
#endif
|
||||||
typedef CTextButton ValueButton;
|
typedef CTextButton ValueButton;
|
||||||
typedef CHoverButton LoadFileButton;
|
typedef SHoverButton LoadFileButton;
|
||||||
typedef CHoverButton CCButton;
|
typedef SHoverButton CCButton;
|
||||||
typedef CHoverButton HomeButton;
|
typedef SHoverButton HomeButton;
|
||||||
typedef CHoverButton SettingsButton;
|
typedef SHoverButton SettingsButton;
|
||||||
typedef CHoverButton EditFileButton;
|
typedef SHoverButton EditFileButton;
|
||||||
typedef SPiano Piano;
|
typedef SPiano Piano;
|
||||||
|
|
||||||
auto createLogicalGroup = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int) {
|
auto createLogicalGroup = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int) {
|
||||||
|
|
@ -480,7 +480,7 @@ void Editor::Impl::createFrameContents()
|
||||||
return vm;
|
return vm;
|
||||||
};
|
};
|
||||||
auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) {
|
auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) {
|
||||||
CHoverButton* btn = new CHoverButton(bounds, this, tag, glyph);
|
SHoverButton* btn = new SHoverButton(bounds, this, tag, glyph);
|
||||||
btn->setFont(new CFontDesc("Fluent System Regular W20", fontsize));
|
btn->setFont(new CFontDesc("Fluent System Regular W20", fontsize));
|
||||||
btn->setTextColor(theme->icon);
|
btn->setTextColor(theme->icon);
|
||||||
btn->setHoverColor(theme->iconHighlight);
|
btn->setHoverColor(theme->iconHighlight);
|
||||||
|
|
|
||||||
|
|
@ -428,19 +428,19 @@ void SValueMenu::onItemClicked(int32_t index)
|
||||||
valueChanged();
|
valueChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHoverButton::setHoverColor (const CColor& color)
|
void SHoverButton::setHoverColor (const CColor& color)
|
||||||
{
|
{
|
||||||
hoverColor_ = color;
|
hoverColor_ = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMouseEventResult CHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons)
|
CMouseEventResult SHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons)
|
||||||
{
|
{
|
||||||
backupColor_ = getTextColor();
|
backupColor_ = getTextColor();
|
||||||
setTextColor(hoverColor_);
|
setTextColor(hoverColor_);
|
||||||
return CTextButton::onMouseEntered(where, buttons);
|
return CTextButton::onMouseEntered(where, buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
CMouseEventResult CHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons)
|
CMouseEventResult SHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons)
|
||||||
{
|
{
|
||||||
setTextColor(backupColor_);
|
setTextColor(backupColor_);
|
||||||
return CTextButton::onMouseExited(where, buttons);
|
return CTextButton::onMouseExited(where, buttons);
|
||||||
|
|
|
||||||
|
|
@ -149,9 +149,9 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
class CHoverButton: public CTextButton {
|
class SHoverButton: public CTextButton {
|
||||||
public:
|
public:
|
||||||
CHoverButton(const CRect& size, IControlListener* listener = nullptr, int32_t tag = -1, UTF8StringPtr title = nullptr)
|
SHoverButton(const CRect& size, IControlListener* listener = nullptr, int32_t tag = -1, UTF8StringPtr title = nullptr)
|
||||||
: CTextButton(size, listener, tag, title) {}
|
: CTextButton(size, listener, tag, title) {}
|
||||||
|
|
||||||
void setHoverColor(const CColor& color);
|
void setHoverColor(const CColor& color);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue