mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
Add an option to disable shift + clear (#368)
* add bgcolor to turtul module * add bgcolor to toolbox and a minor fix * ok is ok now i hope however * Submodule Omega-Kawaii-Theme remove * this featurs https://github.com/UpsilonNumworks/Upsilon/issues/285 * Update escher/src/text_area.cpp casse coresction Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * change name of function beacause code to late in night is bad idee * invation of capital letter * Update apps/settings/sub_menu/code_options_controller.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update escher/src/text_area.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * im not shure all is done * the last hiden locke * fix https://github.com/UpsilonNumworks/Upsilon/issues/271 * Update apps/global_preferences.h Co-authored-by: Quentin <github@arra.red> * Update apps/settings/sub_menu/code_options_controller.cpp Co-authored-by: Quentin <git@quentinguidee.dev> * Update apps/global_preferences.h Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/global_preferences.h Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * reformatting the code to meet the expected quality * Update apps/settings/base.pt.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.de.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.es.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.hu.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.it.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.nl.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * fix nameing * Update apps/settings/base.en.i18n --------- Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> Co-authored-by: Quentin <github@arra.red> Co-authored-by: Quentin <git@quentinguidee.dev>
This commit is contained in:
@@ -13,6 +13,7 @@ CodeOptionsController::CodeOptionsController(Responder * parentResponder) :
|
||||
m_chevronCellFontSize.setMessageFont(KDFont::LargeFont);
|
||||
m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont);
|
||||
m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont);
|
||||
m_switchCellClearShift.setMessageFont(KDFont::LargeFont);
|
||||
}
|
||||
|
||||
bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
|
||||
@@ -26,6 +27,10 @@ bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
|
||||
GlobalPreferences::sharedGlobalPreferences()->setSyntaxhighlighting(!GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
||||
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||
break;
|
||||
case 3:
|
||||
GlobalPreferences::sharedGlobalPreferences()->setClearShift(!GlobalPreferences::sharedGlobalPreferences()->clearShift());
|
||||
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||
break;
|
||||
default:
|
||||
GenericSubController * subController = nullptr;
|
||||
subController = &m_preferencesController;
|
||||
@@ -48,8 +53,10 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) {
|
||||
}
|
||||
else if (index == 1) {
|
||||
return &m_switchCellAutoCompletion;
|
||||
} else if (index == 2) {
|
||||
return &m_switchCellSyntaxHighlighting;
|
||||
}
|
||||
return &m_switchCellSyntaxHighlighting;
|
||||
return &m_switchCellClearShift;
|
||||
}
|
||||
|
||||
int CodeOptionsController::reusableCellCount(int type) {
|
||||
@@ -79,6 +86,11 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in
|
||||
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
|
||||
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
||||
}
|
||||
else if (thisLabel == I18n::Message::ClearShift) {
|
||||
MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell;
|
||||
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
|
||||
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearShift());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user