summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-02 17:09:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-02 17:09:28 +0300
commitedc8de3400acbbae60930a9c1d4f946df5b2e68f (patch)
treec5123ecfe12df3c543e34be058408c56822b6dc4 /src/gui/widgets/textfield.cpp
parent2f8fac791e34fe3831518490ae26c752b49ec1f6 (diff)
downloadplus-edc8de3400acbbae60930a9c1d4f946df5b2e68f.tar.gz
plus-edc8de3400acbbae60930a9c1d4f946df5b2e68f.tar.bz2
plus-edc8de3400acbbae60930a9c1d4f946df5b2e68f.tar.xz
plus-edc8de3400acbbae60930a9c1d4f946df5b2e68f.zip
In chat add key Ctrl+b for insert bold/normal font size.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index aef977d80..1906c5c32 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -64,7 +64,8 @@ TextField::TextField(const Widget2 *restrict const widget,
mLastEventPaste(false),
mPadding(1),
mNumeric(false),
- mLoseFocusOnTab(loseFocusOnTab)
+ mLoseFocusOnTab(loseFocusOnTab),
+ mAllowSpecialActions(true)
{
setFrameSize(2);
mForegroundColor = getThemeColor(Theme::TEXTFIELD);
@@ -397,8 +398,11 @@ void TextField::handleCtrlKeys(const int action, bool &consumed)
}
case Input::KEY_GUI_B:
{
- moveCaretBack();
- consumed = true;
+ if (mAllowSpecialActions)
+ {
+ moveCaretBack();
+ consumed = true;
+ }
break;
}
case Input::KEY_GUI_F: