-
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 #39 from nikwen/unifiedThreadPostCreationPage
Unified thread/post creation page and drafts for posts
- Loading branch information
Showing
15 changed files
with
542 additions
and
313 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/************************************************************************* | ||
** Forum Browser | ||
** | ||
** Copyright (c) 2014 Niklas Wenzel <[email protected]> | ||
** | ||
** $QT_BEGIN_LICENSE:GPL$ | ||
** 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 2 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; see the file COPYING. If not, write to | ||
** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
** Boston, MA 02110-1301, USA. | ||
** | ||
** | ||
** $QT_END_LICENSE$ | ||
** | ||
*************************************************************************/ | ||
|
||
import QtQuick 2.2 | ||
import Qt.labs.settings 1.0 | ||
|
||
Settings { | ||
property string signature: i18n.tr("Sent from my awesome Ubuntu Touch device using the Forum Browser app") | ||
} |
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,67 @@ | ||
/* | ||
* Copyright 2012 Canonical Ltd. | ||
* Copyright 2014 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.2 | ||
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 | ||
|
||
Item { | ||
id: middleVisuals | ||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
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 (this is the only change to this file besides the removal of example code comments and fixing the imports) | ||
} | ||
} | ||
} |
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,85 @@ | ||
/************************************************************************* | ||
** Forum Browser | ||
** | ||
** Copyright (c) 2014 Niklas Wenzel <[email protected]> | ||
** | ||
** $QT_BEGIN_LICENSE:GPL$ | ||
** 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 2 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; see the file COPYING. If not, write to | ||
** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
** Boston, MA 02110-1301, USA. | ||
** | ||
** | ||
** $QT_END_LICENSE$ | ||
** | ||
*************************************************************************/ | ||
|
||
import QtQuick 2.2 | ||
import Ubuntu.Components 1.1 | ||
import Ubuntu.Components.Popups 1.0 | ||
import Ubuntu.Components.ListItems 1.0 as ListItem | ||
import Ubuntu.Components.Themes.Ambiance 0.1 | ||
import "../../stringutils.js" as StringUtils | ||
import "../../backend" | ||
import "../components" | ||
|
||
Page { | ||
id: editSignaturePage | ||
|
||
title: i18n.tr("Edit Signature") | ||
|
||
Component.onCompleted: { | ||
signatureTextField.text = backend.signature | ||
} | ||
|
||
head.actions: [ | ||
Action { | ||
id: saveAction | ||
text: i18n.tr("Save") | ||
iconName: "ok" | ||
|
||
onTriggered: { | ||
backend.signature = signatureTextField.text | ||
pageStack.pop() | ||
} | ||
} | ||
] | ||
|
||
head.backAction: Action { | ||
id: cancelAction | ||
text: i18n.tr("Cancel") | ||
iconName: "close" | ||
|
||
onTriggered: { | ||
pageStack.pop() | ||
} | ||
} | ||
|
||
TextArea { | ||
id: signatureTextField | ||
autoSize: false | ||
maximumLineCount: 0 | ||
placeholderText: i18n.tr("Enter signature or leave blank") | ||
|
||
anchors { | ||
fill: parent | ||
margins: units.gu(2) | ||
} | ||
|
||
style: TextAreaStyle { | ||
overlaySpacing: 0 | ||
frameSpacing: 0 | ||
background: Item {} | ||
} | ||
} | ||
} |
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,48 @@ | ||
/************************************************************************* | ||
** Forum Browser | ||
** | ||
** Copyright (c) 2014 Niklas Wenzel <[email protected]> | ||
** | ||
** $QT_BEGIN_LICENSE:GPL$ | ||
** 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 2 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; see the file COPYING. If not, write to | ||
** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
** Boston, MA 02110-1301, USA. | ||
** | ||
** | ||
** $QT_END_LICENSE$ | ||
** | ||
*************************************************************************/ | ||
|
||
import QtQuick 2.2 | ||
import Ubuntu.Components 1.1 | ||
import "../components" | ||
|
||
Page { | ||
id: settingsPage | ||
title: i18n.tr("Settings") | ||
|
||
Column { | ||
anchors.fill: parent | ||
|
||
OneLineSubtitledListItem { | ||
text: i18n.tr("Signature") | ||
subText: backend.signature | ||
progression: true | ||
|
||
onClicked: { | ||
pageStack.push(Qt.resolvedUrl("EditSignaturePage.qml")) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.