Browse Source

merge

ebf201902131852
erinn 1 year ago
parent
commit
454244934a
11 changed files with 21 additions and 18 deletions
  1. +2
    -12
      android/AndroidManifest.xml
  2. BIN
      android/libs/armeabi-v7a/libtor.so
  3. BIN
      android/res/drawable-hdpi/ic_launcher.png
  4. BIN
      android/res/drawable-mdpi/ic_launcher.png
  5. BIN
      android/res/drawable-xhdpi/ic_launcher.png
  6. BIN
      android/res/drawable-xxhdpi/ic_launcher.png
  7. BIN
      android/res/drawable-xxxhdpi/ic_launcher.png
  8. +1
    -0
      go/gothings/gcd.go
  9. +12
    -1
      main.go
  10. +4
    -3
      qml/panes/SettingsPane.qml
  11. +2
    -2
      qml/widgets/Message.qml

+ 2
- 12
android/AndroidManifest.xml View File

@@ -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
android/libs/armeabi-v7a/libtor.so View File


BIN
android/res/drawable-hdpi/ic_launcher.png View File

Before After
Width: 64  |  Height: 54  |  Size: 4.0KB

BIN
android/res/drawable-mdpi/ic_launcher.png View File

Before After
Width: 64  |  Height: 54  |  Size: 4.0KB

BIN
android/res/drawable-xhdpi/ic_launcher.png View File

Before After
Width: 64  |  Height: 54  |  Size: 4.0KB

BIN
android/res/drawable-xxhdpi/ic_launcher.png View File

Before After
Width: 64  |  Height: 54  |  Size: 4.0KB

BIN
android/res/drawable-xxxhdpi/ic_launcher.png View File

Before After
Width: 64  |  Height: 54  |  Size: 4.0KB

+ 1
- 0
go/gothings/gcd.go View File

@@ -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",


+ 12
- 1
main.go View File

@@ -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)


+ 4
- 3
qml/panes/SettingsPane.qml View File

@@ -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
}

+ 2
- 2
qml/widgets/Message.qml View File

@@ -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)


Loading…
Cancel
Save