geforkt von cwtch.im/ui
1
0
Fork 0
Dieser Commit ist enthalten in:
erinn 2019-02-13 18:53:36 -08:00
Ursprung 5bdfc856a0
Commit 454244934a
11 geänderte Dateien mit 21 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -1,9 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest package="org.qtproject.example.go" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="cwtch">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="cwtch" android:icon="@drawable/ic_launcher">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
android:name="org.qtproject.qt5.android.bindings.QtActivity"
android:label="go"
android:label="cwtch"
android:screenOrientation="unspecified"
android:launchMode="singleTop">
<intent-filter>
@ -72,20 +72,10 @@
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
</manifest>

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 4.0 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 4.0 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 4.0 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 4.0 KiB

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 4.0 KiB

Datei anzeigen

@ -403,6 +403,7 @@ func (this *GrandCentralDispatcher) createGroup(server, groupName string) {
})
group := the.Peer.GetGroup(groupID)
group.SetAttribute("nick", groupName)
the.CwtchApp.EventBus().Publish(event.NewEvent(event.SetGroupAttribute, map[event.Field]string{
event.GroupID: groupID,
event.Key: "nick",

13
main.go
Datei anzeigen

@ -18,6 +18,7 @@ import (
"os"
"os/user"
"path"
"runtime"
)
func init() {
@ -54,10 +55,20 @@ func main() {
engine := qml.NewQQmlApplicationEngine(nil)
// variables we want to access from inside qml
if runtime.GOOS == "android" {
gcd.SetThemeScale(2.9)
} else {
gcd.SetThemeScale(1.0)
}
engine.RootContext().SetContextProperty("gcd", gcd)
engine.Load(qmlSource)
acn, err := connectivity.StartTor(the.CwtchDir, "")
torpath := "tor"
if runtime.GOOS == "android" {
torpath = "/data/data/org.qtproject.example.go/lib/libtor.so"
}
acn, err := connectivity.StartTor(the.CwtchDir, torpath)
if err != nil {
log.Errorf("Could not start Tor: %v", err)
os.Exit(1)

Datei anzeigen

@ -29,12 +29,13 @@ ColumnLayout { // settingsPane
Slider {
id: zoomSlider
minimumValue: 0.5
maximumValue: 2.4
value: 1
maximumValue: 4.0
value: gcd.themeScale
updateValueWhileDragging: false
onValueChanged: {
gcd.themeScale = zoomSlider.value
}
width: 400
}
ScalingLabel {
@ -54,7 +55,7 @@ ColumnLayout { // settingsPane
}//end of column with padding
Component.onCompleted: {
zoomSlider.value = 1 //Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
zoomSlider.value = gcd.themeScale //Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
if (zoomSlider.value < zoomSlider.from) zoomSlider.value = zoomSlider.from
if (zoomSlider.value > zoomSlider.to) zoomSlider.value = zoomSlider.to
}

Datei anzeigen

@ -80,7 +80,7 @@ RowLayout {
visible: false
padding: 6
leftPadding: 10
font.pixelSize: 12
font.pixelSize: gcd.themeScale * 12
wrapMode: TextEdit.NoWrap
text: message
textFormat: Text.RichText
@ -91,7 +91,7 @@ RowLayout {
color: "#FFFFFF"
padding: 6
leftPadding: 10
font.pixelSize: 12
font.pixelSize: gcd.themeScale * 12
selectByMouse: true
readOnly: true
width: Math.min(dummy.width, root.parent.width - (imgProfile.visible ? imgProfile.width : 0) - 40)