Minor clean up.

This commit is contained in:
Martín Lucas Golini
2024-01-29 00:05:22 -03:00
parent d4e859be4b
commit 9a0057c890
20 changed files with 42 additions and 184 deletions
+1
View File
@@ -6,6 +6,7 @@
#include <eepp/graphics/rectangledrawable.hpp>
#include <eepp/graphics/triangledrawable.hpp>
#include <eepp/scene/scenemanager.hpp>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/drawableimageparser.hpp>
#include <eepp/ui/uiiconthememanager.hpp>
#include <eepp/ui/uinode.hpp>
+1
View File
@@ -1,5 +1,6 @@
#include <algorithm>
#include <array>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/stylesheet.hpp>
#include <eepp/ui/css/stylesheetproperty.hpp>
#include <eepp/ui/css/stylesheetselector.hpp>
+1
View File
@@ -2,6 +2,7 @@
#include <eepp/core/string.hpp>
#include <eepp/graphics/pixeldensity.hpp>
#include <eepp/graphics/text.hpp>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/propertydefinition.hpp>
#include <eepp/ui/css/shorthanddefinition.hpp>
#include <eepp/ui/css/stylesheetlength.hpp>
@@ -1,3 +1,4 @@
#include <eepp/system/log.hpp>
#include <eepp/ui/css/propertyspecification.hpp>
#include <eepp/ui/css/stylesheetspecification.hpp>
#include <eepp/ui/uiwidget.hpp>
+18 -17
View File
@@ -1,6 +1,8 @@
#include <algorithm>
#include <eepp/system/filesystem.hpp>
#include <eepp/system/iostreamfile.hpp>
#include <eepp/system/iostreammemory.hpp>
#include <eepp/system/log.hpp>
#include <eepp/system/luapattern.hpp>
#include <eepp/system/packmanager.hpp>
#include <eepp/ui/doc/languages/angelscript.hpp>
@@ -1124,23 +1126,22 @@ static void addCMake() {
for ( const auto& keyword : cmake_literals )
cmake_symbols[keyword] = "literal";
SyntaxDefinitionManager::instance()->add(
{ "CMake",
{ "%.cmake$", "CMakeLists.txt$" },
{
{ { "#", "[^\\]\n" }, "comment" },
{ { "\"", "\"", "\\" }, "string" },
{ { "'", "'", "\\" }, "string" },
{ { "[%a_][%w_]*%s?%f[(]" }, "function" },
{ { "CMAKE_[%w%d_]+" }, "keyword" },
{ { "CTEST_[%w%d_]+" }, "keyword" },
{ { "%u[%u%d_]*_[%u%d_]+" }, "keyword" },
{ { "%${[%a_][%w_]*%}" }, "keyword2" },
{ { "[%a_][%w_]*" }, "symbol" },
},
std::move( cmake_symbols ),
"//",
{ "^cmake_minimum_required.*%c" } } );
SyntaxDefinitionManager::instance()->add( { "CMake",
{ "%.cmake$", "CMakeLists.txt$" },
{
{ { "#", "[^\\]\n" }, "comment" },
{ { "\"", "\"", "\\" }, "string" },
{ { "'", "'", "\\" }, "string" },
{ { "[%a_][%w_]*%s?%f[(]" }, "function" },
{ { "CMAKE_[%w%d_]+" }, "keyword" },
{ { "CTEST_[%w%d_]+" }, "keyword" },
{ { "%u[%u%d_]*_[%u%d_]+" }, "keyword" },
{ { "%${[%a_][%w_]*%}" }, "keyword2" },
{ { "[%a_][%w_]*" }, "symbol" },
},
std::move( cmake_symbols ),
"//",
{ "^cmake_minimum_required.*%c" } } );
}
static void addJSX() {
+4
View File
@@ -52,6 +52,10 @@ UIMessageBox::UIMessageBox( const Type& type, const String& message, const Uint3
->setLayoutMargin( Rectf( 0, 4, 0, 4 ) )
->setSize( PixelDensity::dpToPx( Vector2f{ 400, 100 } ) )
->setParent( vlay );
mTextEdit->getDocument().setCommand( "complete-edit",
[this] { sendCommonEvent( Event::OnConfirm ); } );
mTextEdit->getKeyBindings().addKeybind( { KEY_RETURN, KeyMod::getDefaultModifier() },
"complete-edit" );
}
UILinearLayout* hlay = UILinearLayout::NewHorizontal();
+1
View File
@@ -1,6 +1,7 @@
#include <eepp/graphics/font.hpp>
#include <eepp/graphics/primitives.hpp>
#include <eepp/graphics/text.hpp>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/propertydefinition.hpp>
#include <eepp/ui/uiscenenode.hpp>
#include <eepp/ui/uiscrollbar.hpp>
+1
View File
@@ -9,6 +9,7 @@
#include <eepp/graphics/textureatlasmanager.hpp>
#include <eepp/graphics/texturefactory.hpp>
#include <eepp/system/filesystem.hpp>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/stylesheetparser.hpp>
#include <eepp/ui/uiicontheme.hpp>
#include <eepp/ui/uistate.hpp>
+1
View File
@@ -1,6 +1,7 @@
#include <eepp/graphics/fontmanager.hpp>
#include <eepp/graphics/text.hpp>
#include <eepp/scene/actions/actions.hpp>
#include <eepp/system/log.hpp>
#include <eepp/ui/css/propertydefinition.hpp>
#include <eepp/ui/uiscenenode.hpp>
#include <eepp/ui/uithememanager.hpp>
-144
View File
@@ -1,144 +0,0 @@
#include <eepp/window/inputhelper.hpp>
namespace EE { namespace Window {
Uint32 InputHelper::convertKeyCharacter( const Uint32& KeyCode, const Uint16& Unicode ) {
Uint32 value = 0;
if ( Unicode < 255 ) {
value = Unicode;
}
if ( String::isCharacter( value ) ) {
return value;
}
switch ( KeyCode ) {
case KEY_TAB:
value = KEY_TAB;
break;
case KEY_LALT:
value = KEY_LALT;
break;
case KEY_RALT:
value = KEY_RALT;
break;
case KEY_LSHIFT:
value = KEY_LSHIFT;
break;
case KEY_RSHIFT:
value = KEY_RSHIFT;
break;
case KEY_LCTRL:
value = KEY_RSHIFT;
break;
case KEY_RCTRL:
value = KEY_LCTRL;
break;
case KEY_BACKSPACE:
value = KEY_BACKSPACE;
break;
case KEY_PAUSE:
value = KEY_PAUSE;
break;
case KEY_SPACE:
value = KEY_SPACE;
break;
case KEY_ESCAPE:
value = KEY_ESCAPE;
break;
case KEY_DELETE:
value = KEY_DELETE;
break;
case KEY_INSERT:
value = KEY_INSERT;
break;
case KEY_HOME:
value = KEY_HOME;
break;
case KEY_END:
value = KEY_END;
break;
case KEY_PAGEUP:
value = KEY_PAGEUP;
break;
case KEY_PAGEDOWN:
value = KEY_PAGEDOWN;
break;
case KEY_F1:
value = KEY_F1;
break;
case KEY_F2:
value = KEY_F2;
break;
case KEY_F3:
value = KEY_F3;
break;
case KEY_F4:
value = KEY_F4;
break;
case KEY_F5:
value = KEY_F5;
break;
case KEY_F6:
value = KEY_F6;
break;
case KEY_F7:
value = KEY_F7;
break;
case KEY_F8:
value = KEY_F8;
break;
case KEY_F9:
value = KEY_F9;
break;
case KEY_F10:
value = KEY_F10;
break;
case KEY_F11:
value = KEY_F11;
break;
case KEY_F12:
value = KEY_F12;
break;
case KEY_F13:
value = KEY_F13;
break;
case KEY_F14:
value = KEY_F14;
break;
case KEY_F15:
value = KEY_F15;
break;
case KEY_CAPSLOCK:
value = KEY_CAPSLOCK;
break;
case KEY_MODE:
value = KEY_MODE;
break;
case KEY_UP:
value = KEY_UP;
break;
case KEY_DOWN:
value = KEY_DOWN;
break;
case KEY_LEFT:
value = KEY_LEFT;
break;
case KEY_RIGHT:
value = KEY_RIGHT;
break;
case KEY_RETURN:
value = KEY_RETURN;
break;
case KEY_KP_ENTER:
value = KEY_KP_ENTER;
break;
default:
break;
}
return value;
}
}} // namespace EE::Window
@@ -1244,6 +1244,13 @@ void GitPlugin::buildSidePanelTab() {
break;
case KEY_F2:
branchRename( branch );
break;
case KEY_DELETE:
if ( branch.type == Git::RefType::Stash )
stashDrop( branch );
else if ( branch.type == Git::RefType::Head )
branchDelete( branch );
break;
default:
break;
}
+1 -1
View File
@@ -143,7 +143,7 @@ void SettingsMenu::createSettingsMenu( App* app ) {
} );
mApp->updateRecentFiles();
mApp->updateRecentFolders();
Log::info( "Settings Menu took: %.2f ms", clock.getElapsedTime().asMilliseconds() );
Log::info( "Settings Menu took: %s", clock.getElapsedTime().toString() );
}
UIMenu* SettingsMenu::createFileTypeMenu() {