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;
|
||||
#endif
|
||||
typedef CTextButton ValueButton;
|
||||
typedef CHoverButton LoadFileButton;
|
||||
typedef CHoverButton CCButton;
|
||||
typedef CHoverButton HomeButton;
|
||||
typedef CHoverButton SettingsButton;
|
||||
typedef CHoverButton EditFileButton;
|
||||
typedef SHoverButton LoadFileButton;
|
||||
typedef SHoverButton CCButton;
|
||||
typedef SHoverButton HomeButton;
|
||||
typedef SHoverButton SettingsButton;
|
||||
typedef SHoverButton EditFileButton;
|
||||
typedef SPiano Piano;
|
||||
|
||||
auto createLogicalGroup = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int) {
|
||||
|
|
@ -480,7 +480,7 @@ void Editor::Impl::createFrameContents()
|
|||
return vm;
|
||||
};
|
||||
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->setTextColor(theme->icon);
|
||||
btn->setHoverColor(theme->iconHighlight);
|
||||
|
|
|
|||
|
|
@ -428,19 +428,19 @@ void SValueMenu::onItemClicked(int32_t index)
|
|||
valueChanged();
|
||||
}
|
||||
|
||||
void CHoverButton::setHoverColor (const CColor& color)
|
||||
void SHoverButton::setHoverColor (const CColor& color)
|
||||
{
|
||||
hoverColor_ = color;
|
||||
}
|
||||
|
||||
CMouseEventResult CHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons)
|
||||
CMouseEventResult SHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons)
|
||||
{
|
||||
backupColor_ = getTextColor();
|
||||
setTextColor(hoverColor_);
|
||||
return CTextButton::onMouseEntered(where, buttons);
|
||||
}
|
||||
|
||||
CMouseEventResult CHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons)
|
||||
CMouseEventResult SHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons)
|
||||
{
|
||||
setTextColor(backupColor_);
|
||||
return CTextButton::onMouseExited(where, buttons);
|
||||
|
|
|
|||
|
|
@ -149,9 +149,9 @@ private:
|
|||
};
|
||||
|
||||
///
|
||||
class CHoverButton: public CTextButton {
|
||||
class SHoverButton: public CTextButton {
|
||||
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) {}
|
||||
|
||||
void setHoverColor(const CColor& color);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue