forked from jeena/FeedTheMonkey
removed html, added keyboard browsing
This commit is contained in:
parent
6968d8ed0e
commit
8b132bf559
5 changed files with 29 additions and 16 deletions
18
Content.qml
18
Content.qml
|
@ -5,11 +5,21 @@ import TTRSS 1.0
|
|||
|
||||
ScrollView {
|
||||
property Post post
|
||||
property int headLinefontSize: 23
|
||||
property int textfontSize: 14
|
||||
|
||||
style: ScrollViewStyle {
|
||||
transientScrollBars: true
|
||||
}
|
||||
|
||||
function scrollDown() {
|
||||
flickableItem.contentY += 30
|
||||
}
|
||||
|
||||
function scrollUp() {
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
height: column.height + 50
|
||||
width: parent.parent.width
|
||||
|
@ -39,7 +49,7 @@ ScrollView {
|
|||
}
|
||||
}
|
||||
color: "gray"
|
||||
font.pointSize: 16
|
||||
font.pointSize: textfontSize
|
||||
textFormat: Text.PlainText
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
width: parent.width
|
||||
|
@ -48,7 +58,7 @@ ScrollView {
|
|||
|
||||
Label {
|
||||
text: post ? post.title : ""
|
||||
font.pointSize: 30
|
||||
font.pointSize: headLinefontSize
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
width: parent.width
|
||||
renderType: Text.NativeRendering
|
||||
|
@ -62,7 +72,7 @@ ScrollView {
|
|||
Label {
|
||||
text: post ? post.date.toLocaleString(Qt.locale(), Locale.LongFormat) : ""
|
||||
color: "gray"
|
||||
font.pointSize: 16
|
||||
font.pointSize: textfontSize
|
||||
textFormat: Text.PlainText
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
width: parent.width
|
||||
|
@ -98,7 +108,7 @@ ScrollView {
|
|||
id: contentLabel
|
||||
text: post ? "<style>a { color: #555; }</style>" + post.content : ""
|
||||
textFormat: Text.RichText
|
||||
font.pointSize: 16
|
||||
font.pointSize: textfontSize
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
width: parent.width
|
||||
renderType: Text.NativeRendering
|
||||
|
|
|
@ -7,8 +7,7 @@ SOURCES += main.cpp \
|
|||
tinytinyrsslogin.cpp \
|
||||
post.cpp
|
||||
|
||||
RESOURCES += qml.qrc \
|
||||
html.qrc
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
# Needed for bringing browser from background to foreground using QDesktopServices: http://bugreports.qt-project.org/browse/QTBUG-8336
|
||||
TARGET.CAPABILITY += SwEvent
|
||||
|
@ -19,10 +18,7 @@ QML_IMPORT_PATH =
|
|||
# Default rules for deployment.
|
||||
include(deployment.pri)
|
||||
|
||||
OTHER_FILES += \
|
||||
content.html \
|
||||
content.css \
|
||||
content.js
|
||||
OTHER_FILES +=
|
||||
|
||||
HEADERS += \
|
||||
tinytinyrss.h \
|
||||
|
|
|
@ -2,8 +2,10 @@ import QtQuick 2.0
|
|||
import QtQuick.Controls 1.3
|
||||
|
||||
Component {
|
||||
id: component
|
||||
Item {
|
||||
property int headLinefontSize: 14
|
||||
property int smallfontSize: 10
|
||||
|
||||
id: item
|
||||
height: column.height + 20
|
||||
width: parent.parent.parent.width
|
||||
|
@ -28,7 +30,7 @@ Component {
|
|||
spacing: 10
|
||||
Label {
|
||||
text: feedTitle
|
||||
font.pointSize: 12
|
||||
font.pointSize: smallfontSize
|
||||
textFormat: Text.PlainText
|
||||
color: "gray"
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
|
@ -36,7 +38,7 @@ Component {
|
|||
}
|
||||
Label {
|
||||
text: date.toLocaleString(Qt.locale(), Locale.ShortFormat)
|
||||
font.pointSize: 12
|
||||
font.pointSize: smallfontSize
|
||||
textFormat: Text.PlainText
|
||||
color: "gray"
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
|
@ -45,7 +47,7 @@ Component {
|
|||
}
|
||||
Label {
|
||||
text: title
|
||||
font.pointSize: 16
|
||||
font.pointSize: headLinefontSize
|
||||
textFormat: Text.PlainText
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
renderType: Text.NativeRendering
|
||||
|
@ -53,7 +55,7 @@ Component {
|
|||
}
|
||||
Label {
|
||||
text: excerpt
|
||||
font.pointSize: 12
|
||||
font.pointSize: smallfontSize
|
||||
textFormat: Text.RichText
|
||||
color: "gray"
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
|
|
|
@ -2,7 +2,6 @@ import QtQuick.Controls 1.2
|
|||
import TTRSS 1.0
|
||||
|
||||
MenuBar {
|
||||
|
||||
property bool loggedIn: false
|
||||
property Server server
|
||||
property Sidebar sidebar
|
||||
|
|
6
main.qml
6
main.qml
|
@ -30,6 +30,7 @@ ApplicationWindow {
|
|||
anchors.fill: parent
|
||||
orientation: Qt.Horizontal
|
||||
visible: serverLogin.loggedIn()
|
||||
focus: true
|
||||
|
||||
Sidebar {
|
||||
id: sidebar
|
||||
|
@ -46,6 +47,11 @@ ApplicationWindow {
|
|||
Layout.minimumWidth: 200
|
||||
implicitWidth: 624
|
||||
}
|
||||
|
||||
Keys.onRightPressed: sidebar.next()
|
||||
Keys.onLeftPressed: sidebar.previous()
|
||||
Keys.onDownPressed: content.scrollDown()
|
||||
Keys.onUpPressed: content.scrollUp()
|
||||
}
|
||||
|
||||
Login {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue