Skip to content

Commit

Permalink
[WIP] Completely rebuild the app in QML and overhaul the codebase
Browse files Browse the repository at this point in the history
This commit will shred every speck of Jekyll out of the welcome
app, replacing it with a nice QML interface. While I'm not going
for a pixel-perfect recreation of the app, I'm trying to get a
UI that looks mostly the same as the Jekyll version.

As part of the rewrite, I'm overhauling the codebase to use best
practices for modern Qt and open-source projects in general. This
includes adding a .clang-format file to keep the code looking nice.
  • Loading branch information
LorenDB committed Feb 28, 2024
1 parent 89e767a commit bbbf729
Show file tree
Hide file tree
Showing 48 changed files with 1,388 additions and 8,475 deletions.
135 changes: 135 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: false
AlignOperands: true
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortEnumsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
#BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 125
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(Q|Qt)/'
Priority: 1
- Regex: '.*'
Priority: 2
#IndentCaseBlocks: false
IndentCaseLabels: false
#IndentExternBlocks: true
IndentGotoLabels: false
IndentPPDirectives: BeforeHash
IndentWidth: 4
IndentWrappedFunctionNames: true
#InsertTrailingCommas: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PackConstructorInitializers: Never
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 0
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 100
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 10000000
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
#SpaceAroundPointerQualifiers: Before
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
#SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
#UseTab: AlignWithSpaces
28 changes: 28 additions & 0 deletions data/qrc/ThemedButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import QtQuick
import QtQuick.Controls

Button {
id: buttonRoot

required property color themeColor

implicitWidth: 200
implicitHeight: 40
icon.height: font.pixelSize
icon.color: palette.text

background: Rectangle {
border.color: (buttonRoot.pressed || hh.hovered) ? Qt.darker(themeColor, 1.4) : themeColor
color: (buttonRoot.pressed || hh.hovered) ? Qt.darker(themeColor, 1.4) : themeColor
radius: 5
width: buttonRoot.width
height: buttonRoot.height

Behavior on color { ColorAnimation { duration: 100 } }
}

HoverHandler {
id: hh
cursorShape: Qt.PointingHandCursor
}
}
8 changes: 0 additions & 8 deletions data/qrc/css.qrc

This file was deleted.

9 changes: 0 additions & 9 deletions data/qrc/html.qrc

This file was deleted.

36 changes: 36 additions & 0 deletions data/qrc/icons/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions data/qrc/icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions data/qrc/icons/book.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions data/qrc/icons/check-square-o.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions data/qrc/icons/desktop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bbbf729

Please sign in to comment.