forked from cwtch.im/ui
Merge branch 'ebf201902131852' of cwtch.im/ui into master
This commit is contained in:
commit
7b776bde57
|
@ -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>
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
|
@ -404,6 +404,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
13
main.go
|
@ -18,6 +18,7 @@ import (
|
|||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -60,10 +61,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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue