-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from nikwen/bbCodeParsing
Introduce proper BB code parsing, visual updates for the ThreadPage
- Loading branch information
Showing
20 changed files
with
1,331 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Copyright 2012 Canonical Ltd. | ||
* Copyright 2015 Niklas Wenzel <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import QtQuick 2.3 | ||
import Ubuntu.Components 1.1 | ||
import Ubuntu.Components.ListItems 1.0 as ListItem | ||
|
||
ListItem.Base { | ||
id: subtitledListItem | ||
__height: Math.max(middleVisuals.height, units.gu(6)) | ||
|
||
/*! | ||
\preliminary | ||
The list of strings that will be shown under the label text | ||
\qmlproperty string subText | ||
*/ | ||
property alias subText: subLabel.text | ||
|
||
property alias checked: checkBox.checked | ||
|
||
Item { | ||
id: middleVisuals | ||
anchors { | ||
left: parent.left | ||
right: checkBox.left //NOTE: Changed the anchor here (also removed the example code comments and fixed the imports) | ||
rightMargin: units.gu(2) //NOTE: Added this margin | ||
verticalCenter: parent.verticalCenter | ||
} | ||
height: childrenRect.height + label.anchors.topMargin + subLabel.anchors.bottomMargin | ||
|
||
LabelVisual { | ||
id: label | ||
text: subtitledListItem.text | ||
selected: subtitledListItem.selected | ||
anchors { | ||
top: parent.top | ||
left: parent.left | ||
right: parent.right | ||
} | ||
} | ||
LabelVisual { | ||
id: subLabel | ||
selected: subtitledListItem.selected | ||
secondary: true | ||
anchors { | ||
|
||
left: parent.left | ||
right: parent.right | ||
top: label.bottom | ||
} | ||
fontSize: "small" | ||
wrapMode: Text.Wrap | ||
maximumLineCount: 1 //NOTE: Changed the line count here | ||
} | ||
} | ||
|
||
CheckBox { //NOTE: Added this CheckBox | ||
id: checkBox | ||
|
||
anchors { | ||
right: parent.right | ||
verticalCenter: parent.verticalCenter | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Forum Browser | ||
* | ||
* Copyright (c) 2014-2015 Niklas Wenzel <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import QtQuick 2.3 | ||
import Ubuntu.Components 1.1 | ||
|
||
Rectangle { | ||
id: verticalDivider | ||
|
||
property alias dividerHeight: verticalDivider.width | ||
property real dividerPadding: units.gu(1) | ||
property bool rotateClockwise: true | ||
|
||
height: (visible) ? units.dp(2) : 0 | ||
|
||
y: width / 2 + dividerPadding | ||
rotation: (rotateClockwise ? 1 : -1) * 90 | ||
transformOrigin: Item.Center | ||
|
||
property bool __lightBackground: ColorUtils.luminance(Theme.palette.normal.background) > 0.85 | ||
|
||
gradient: Gradient { | ||
GradientStop { position: 0.0; color: __lightBackground ? Qt.rgba(0, 0, 0, 0.1) : Qt.rgba(0, 0, 0, 0.4) } | ||
GradientStop { position: 0.49; color: __lightBackground ? Qt.rgba(0, 0, 0, 0.1) : Qt.rgba(0, 0, 0, 0.4) } | ||
GradientStop { position: 0.5; color: __lightBackground ? Qt.rgba(1, 1, 1, 0.4) : Qt.rgba(1, 1, 1, 0.1) } | ||
GradientStop { position: 1.0; color: __lightBackground ? Qt.rgba(1, 1, 1, 0.4) : Qt.rgba(1, 1, 1, 0.1) } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.