new scaling system pass one
the build was successful Details

This commit is contained in:
erinn 2020-12-14 17:22:20 -08:00
parent dfb12a2ab0
commit 290b0b26db
29 changed files with 501 additions and 460 deletions

View File

@ -42,7 +42,12 @@ type GrandCentralDispatcher struct {
_ int `property:"torStatus"`
_ string `property:"os"`
_ bool `property:"firstTime"`
// phasing out themeScale in three steps:
// 1 (current): switch labels to themeScaleNew
// 2: switch everything else to themeScaleNew
// 3: refactor: delete themeScale, rename themeScaleNew -> themeScale
_ float32 `property:"themeScale,auto,changed"`
_ int `property:"themeScaleNew,auto,changed"`
_ string `property:"theme,auto,changed"`
_ string `property:"locale,auto,changed"`
_ string `property:"version"`
@ -159,6 +164,7 @@ func (this *GrandCentralDispatcher) init() {
this.GlobalSettings, firstTime = ReadGlobalSettings()
this.SetFirstTime(firstTime)
this.SetThemeScale(this.GlobalSettings.Zoom)
this.SetThemeScaleNew(this.GlobalSettings.Scale)
this.SetTheme(this.GlobalSettings.Theme)
this.SetExperimentsEnabled(this.GlobalSettings.ExperimentsEnabled)
this.SetExperiments(this.GlobalSettings.Experiments)
@ -779,6 +785,11 @@ func (this *GrandCentralDispatcher) themeScaleChanged(newThemeScale float32) {
WriteGlobalSettings(this.GlobalSettings)
}
func (this *GrandCentralDispatcher) themeScaleNewChanged(newScale int) {
this.GlobalSettings.Scale = newScale
WriteGlobalSettings(this.GlobalSettings)
}
// Turn on/off global experiments
func (this *GrandCentralDispatcher) experimentsEnabledChanged(enabled bool) {
this.GlobalSettings.ExperimentsEnabled = enabled

View File

@ -16,7 +16,8 @@ const GlobalSettingsFilename = "ui.globals"
const saltFile = "SALT"
type GlobalSettings struct {
Zoom float32
Zoom float32 // deprecated
Scale int // the new hotness
Locale string
Theme string
PreviousPid int64
@ -27,6 +28,7 @@ type GlobalSettings struct {
var DefaultGlobalSettings = GlobalSettings{
Zoom: 1.9,
Scale: 2,
Locale: "en",
Theme: "light",
PreviousPid: -1,
@ -76,7 +78,7 @@ func ReadGlobalSettings() (*GlobalSettings, bool) {
return &settings, true //firstTime = true
}
log.Debugf("Settings: %v", settings)
log.Debugf("Settings: %#v", settings)
return &settings, false
}

View File

@ -122,19 +122,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="83"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="85"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="87"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +148,7 @@
<translation type="obsolete">Adresse hier hinzufügen, um einen Kontakt aufzunehmen</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="239"/>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -285,18 +285,18 @@
<translation>Klicken, um DM zu senden</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Nachricht konnte nicht gesendet werden</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>acknowledged-label</source>
<translation>bestätigt</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>pending-label</source>
<translation>Bestätigung ausstehend</translation>
</message>
@ -569,36 +569,36 @@
<context>
<name>ProfileManagerPane</name>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="36"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="33"/>
<source>enter-profile-password</source>
<extracomment>Enter a password to view your profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="52"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="49"/>
<source>password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="75"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="115"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="143"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="63"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="60"/>
<source>unlock</source>
<extracomment>Unlock</extracomment>
<translation type="unfinished"></translation>
@ -649,40 +649,47 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<location filename="../qml/panes/SettingsPane.qml" line="96"/>
<source>medium-text-label</source>
<extracomment>medium text</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="101"/>
<source>large-text-label</source>
<extracomment>large text</extracomment>
<translation>Groß</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="164"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="112"/>
<location filename="../qml/panes/SettingsPane.qml" line="173"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="113"/>
<location filename="../qml/panes/SettingsPane.qml" line="174"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="132"/>
<location filename="../qml/panes/SettingsPane.qml" line="193"/>
<source>experiments-enabled</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="224"/>
<source>version %1 tor %2</source>
<extracomment>Version %1 with tor %2</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="169"/>
<location filename="../qml/panes/SettingsPane.qml" line="232"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>
@ -693,8 +700,9 @@
<translation type="vanished">defaultmäßige Textgröße (Skalierungsfaktor:</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="72"/>
<location filename="../qml/panes/SettingsPane.qml" line="91"/>
<source>small-text-label</source>
<extracomment>small text</extracomment>
<translation>Klein</translation>
</message>
</context>
@ -737,7 +745,7 @@
<context>
<name>main</name>
<message>
<location filename="../qml/main.qml" line="264"/>
<location filename="../qml/main.qml" line="265"/>
<source>new-connection-pane-title</source>
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>

View File

@ -135,24 +135,35 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="83"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation>Your history with this peer is ephemeral and will not be saved. If you would like to save history, please go to settings and turn it on.</translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="85"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation>Message history is disabled.</translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="87"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation>Message history is enabled.</translation>
</message>
</context>
<context>
<name>Collapser/Expander Widget</name>
<message>
<source>collapser-show</source>
<translation type="vanished">Show</translation>
</message>
<message>
<source>collapser-hide</source>
<translation type="vanished">Hide</translation>
</message>
</context>
<context>
<name>ContactList</name>
<message>
@ -161,7 +172,7 @@
<translation type="vanished">... paste an address here to add a contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="239"/>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<source>blocked</source>
<translation>Blocked</translation>
</message>
@ -378,18 +389,18 @@ Right-click to reset.</translation>
<translation>Click to DM</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Could not send this message</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>acknowledged-label</source>
<translation>Acknowledged</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>pending-label</source>
<translation>Pending</translation>
</message>
@ -688,36 +699,36 @@ Right-click to reset.</translation>
<context>
<name>ProfileManagerPane</name>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="36"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="33"/>
<source>enter-profile-password</source>
<extracomment>Enter a password to view your profiles</extracomment>
<translation>Enter a password to view your profiles</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="52"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="49"/>
<source>password</source>
<translation>Password</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="75"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation>0 profiles loaded with that password</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="115"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation>Your Profiles</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="143"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation>Your Servers</translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="63"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="60"/>
<source>unlock</source>
<extracomment>Unlock</extracomment>
<translation>Unlock</translation>
@ -777,34 +788,41 @@ Right-click to reset.</translation>
<translation>Zoom level</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<location filename="../qml/panes/SettingsPane.qml" line="96"/>
<source>medium-text-label</source>
<extracomment>medium text</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="101"/>
<source>large-text-label</source>
<extracomment>large text</extracomment>
<translation>Large</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="164"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation>Theme</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="112"/>
<location filename="../qml/panes/SettingsPane.qml" line="173"/>
<source>theme-light</source>
<translation>Light</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="113"/>
<location filename="../qml/panes/SettingsPane.qml" line="174"/>
<source>theme-dark</source>
<translation>Dark</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="132"/>
<location filename="../qml/panes/SettingsPane.qml" line="193"/>
<source>experiments-enabled</source>
<extracomment>Theme</extracomment>
<translation>Experiments enabled</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="224"/>
<source>version %1 tor %2</source>
<extracomment>Version %1 with tor %2</extracomment>
<translation>Version %1 with tor %2</translation>
@ -815,7 +833,7 @@ Right-click to reset.</translation>
<translation type="vanished">Version %1</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="169"/>
<location filename="../qml/panes/SettingsPane.qml" line="232"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation>Built on: %2</translation>
@ -826,8 +844,9 @@ Right-click to reset.</translation>
<translation type="vanished">Default size text (scale factor:</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="72"/>
<location filename="../qml/panes/SettingsPane.qml" line="91"/>
<source>small-text-label</source>
<extracomment>small text</extracomment>
<translation>Small</translation>
</message>
</context>
@ -878,7 +897,7 @@ Right-click to reset.</translation>
<context>
<name>main</name>
<message>
<location filename="../qml/main.qml" line="264"/>
<location filename="../qml/main.qml" line="265"/>
<source>new-connection-pane-title</source>
<extracomment>New Connection</extracomment>
<translation>New Connection</translation>

View File

@ -122,19 +122,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="83"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="85"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="87"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +148,7 @@
<translation type="obsolete">... coller une adresse ici pour ajouter un contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="239"/>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -285,18 +285,18 @@
<translation>Envoyer un message privé</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Impossible d&apos;envoyer ce message</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>acknowledged-label</source>
<translation>Confirmé</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>pending-label</source>
<translation>En attente</translation>
</message>
@ -569,36 +569,36 @@
<context>
<name>ProfileManagerPane</name>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="36"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="33"/>
<source>enter-profile-password</source>
<extracomment>Enter a password to view your profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="52"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="49"/>
<source>password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="75"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="115"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="143"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="63"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="60"/>
<source>unlock</source>
<extracomment>Unlock</extracomment>
<translation type="unfinished"></translation>
@ -649,40 +649,47 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<location filename="../qml/panes/SettingsPane.qml" line="96"/>
<source>medium-text-label</source>
<extracomment>medium text</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="101"/>
<source>large-text-label</source>
<extracomment>large text</extracomment>
<translation type="unfinished">Large</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="164"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="112"/>
<location filename="../qml/panes/SettingsPane.qml" line="173"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="113"/>
<location filename="../qml/panes/SettingsPane.qml" line="174"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="132"/>
<location filename="../qml/panes/SettingsPane.qml" line="193"/>
<source>experiments-enabled</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="224"/>
<source>version %1 tor %2</source>
<extracomment>Version %1 with tor %2</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="169"/>
<location filename="../qml/panes/SettingsPane.qml" line="232"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>
@ -693,8 +700,9 @@
<translation type="vanished">Taille par défaut du texte (échelle:</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="72"/>
<location filename="../qml/panes/SettingsPane.qml" line="91"/>
<source>small-text-label</source>
<extracomment>small text</extracomment>
<translation>Petit</translation>
</message>
</context>
@ -737,7 +745,7 @@
<context>
<name>main</name>
<message>
<location filename="../qml/main.qml" line="264"/>
<location filename="../qml/main.qml" line="265"/>
<source>new-connection-pane-title</source>
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>

View File

@ -122,19 +122,19 @@
<context>
<name>ChatOverlay</name>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="83"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<source>chat-history-default</source>
<extracomment>This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="85"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ChatOverlay.qml" line="87"/>
<location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment>
<translation type="unfinished"></translation>
@ -148,7 +148,7 @@
<translation type="obsolete"> cole um endereço aqui para adicionar um contato</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="239"/>
<location filename="../qml/widgets/ContactList.qml" line="240"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -285,18 +285,18 @@
<translation>Clique para DM</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Não deu para enviar esta mensagem</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>acknowledged-label</source>
<translation>Confirmada</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="189"/>
<location filename="../qml/widgets/Message.qml" line="188"/>
<source>pending-label</source>
<translation>Pendente</translation>
</message>
@ -569,36 +569,36 @@
<context>
<name>ProfileManagerPane</name>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="36"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="33"/>
<source>enter-profile-password</source>
<extracomment>Enter a password to view your profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="52"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="49"/>
<source>password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="78"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="75"/>
<source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="115"/>
<source>your-profiles</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="143"/>
<source>your-servers</source>
<extracomment>Your Profiles</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="63"/>
<location filename="../qml/panes/ProfileManagerPane.qml" line="60"/>
<source>unlock</source>
<extracomment>Unlock</extracomment>
<translation type="unfinished"></translation>
@ -649,40 +649,47 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<location filename="../qml/panes/SettingsPane.qml" line="96"/>
<source>medium-text-label</source>
<extracomment>medium text</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="101"/>
<source>large-text-label</source>
<extracomment>large text</extracomment>
<translation>Grande</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="164"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="112"/>
<location filename="../qml/panes/SettingsPane.qml" line="173"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="113"/>
<location filename="../qml/panes/SettingsPane.qml" line="174"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="132"/>
<location filename="../qml/panes/SettingsPane.qml" line="193"/>
<source>experiments-enabled</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="224"/>
<source>version %1 tor %2</source>
<extracomment>Version %1 with tor %2</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="169"/>
<location filename="../qml/panes/SettingsPane.qml" line="232"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>
@ -693,8 +700,9 @@
<translation type="vanished">Texto tamanho padrão (fator de escala: </translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="72"/>
<location filename="../qml/panes/SettingsPane.qml" line="91"/>
<source>small-text-label</source>
<extracomment>small text</extracomment>
<translation>Pequeno</translation>
</message>
</context>
@ -737,7 +745,7 @@
<context>
<name>main</name>
<message>
<location filename="../qml/main.qml" line="264"/>
<location filename="../qml/main.qml" line="265"/>
<source>new-connection-pane-title</source>
<extracomment>New Connection</extracomment>
<translation type="unfinished"></translation>

View File

@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import "opaque"
import "opaque" as Opaque
import "opaque/fonts"
import "opaque/fonts/MutantStandard.js" as Mutant
import "opaque/theme"
@ -17,7 +17,7 @@ import "utils.js" as Utils
ApplicationWindow {
id: windowItem
width: 1200
width: 600 + Theme.scale * 200
height: 800
visible: true
title: "cwtch" + ""
@ -26,7 +26,7 @@ ApplicationWindow {
readonly property real ratio: height / width
FontAwesome { // PRETTY BUTTON ICONS
Opaque.FontAwesome { // PRETTY BUTTON ICONS
id: awesome
resource: "qrc:/qml/opaque/fonts/fontawesome.ttf"
}
@ -94,10 +94,13 @@ ApplicationWindow {
// The actual app
property Item mainLayout: Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: Theme.backgroundMainColor
Toolbar {
Opaque.Toolbar {
id: toolbar
rightPaneWidth: theStack.width
onLeftMenu: {
gcd.requestSettings()
@ -186,10 +189,10 @@ ApplicationWindow {
Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS
color: Theme.backgroundMainColor
Layout.fillHeight: true
Layout.minimumWidth: Theme.sidePaneMinSize * gcd.themeScale
Layout.maximumWidth: theStack.pane == theStack.emptyPane ? parent.width : (Theme.sidePaneMinSize * gcd.themeScale)
Layout.minimumWidth: Theme.sidePaneMinSize
Layout.maximumWidth: theStack.pane == theStack.emptyPane ? parent.width : Theme.sidePaneMinSize
Layout.fillWidth: theStack.pane == theStack.emptyPane ? true : false
visible: (windowItem.width >= (Theme.doublePaneMinSize * gcd.themeScale) && !Qt.inputMethod.visible) || theStack.pane == theStack.emptyPane
visible: (windowItem.width >= Theme.doublePaneMinSize && !Qt.inputMethod.visible) || theStack.pane == theStack.emptyPane
ContactList {
anchors.top: parent.top
@ -230,7 +233,10 @@ ApplicationWindow {
readonly property int addPeerGroupPane: 4
readonly property int serverInfoPane: 5
Item { anchors.fill: parent } // empty
Item { // empty
Layout.fillWidth: true
Layout.fillHeight: true
}
Rectangle {
color: Theme.backgroundMainColor
@ -243,16 +249,27 @@ ApplicationWindow {
}
PeerSettingsPane { anchors.fill: parent }
PeerSettingsPane {
Layout.fillWidth: true
Layout.fillHeight: true
}
GroupSettingsPane{ anchors.fill: parent }
GroupSettingsPane{
Layout.fillWidth: true
Layout.fillHeight: true
}
AddPeerGroupPane {
id: addPeerGroupPaneInstance
anchors.fill: parent
Layout.fillWidth: true
Layout.fillHeight: true
}
ServerInfoPane { anchors.fill: parent }
ServerInfoPane {
Layout.fillWidth: true
Layout.fillHeight: true
}
onCurrentIndexChanged: {
gcd.setProfilePaneState(theStack.currentIndex)
@ -267,8 +284,6 @@ ApplicationWindow {
addPeerGroupPaneInstance.reset()
}
}
onWidthChanged: {toolbar.titleWidth = width}
}
}
}
@ -384,19 +399,18 @@ ApplicationWindow {
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 20
width: lblPopup.width + 30
height: lblPopup.height + 8 * gcd.themeScale
width: lblPopup.width + 2 * gcd.paddingStandard
height: lblPopup.height + 2 * gcd.paddingStandard
color: "#000000"
opacity: 0.5
radius: 15
visible: false
Label {
Opaque.Label {
id: lblPopup
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 18 * gcd.themeScale
color: "#FFFFFF"
}
}

@ -1 +1 @@
Subproject commit 48d9d1d11f4efe612419ea66371c4b147f74667d
Subproject commit 6b285e4bbc2a673fceb1c0ffb0065d1dae9c5f8b

View File

@ -14,6 +14,7 @@ import "../utils.js" as Utils
ColumnLayout {
Layout.fillWidth: true
width:parent.width
Layout.margins: Theme.paddingStandard
Text {
Layout.fillWidth: true
@ -26,10 +27,7 @@ ColumnLayout {
style: CwtchTextFieldStyle{}
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
width: parent.width - 2 * parent.padding
onTextChanged: {
bulletinView.filter = text
@ -247,8 +245,7 @@ ColumnLayout {
id: btnSend
icon: "regular/paper-plane"
text: "post"
anchors.right: parent.right
anchors.rightMargin: 2
Layout.alignment: Qt.AlignRight
property int nextMessageID: 1

View File

@ -14,7 +14,7 @@ import "../opaque/theme"
ColumnLayout {
Layout.fillWidth: true
width:parent.width
width: parent.width
id: listpanel
property bool online: false
@ -25,9 +25,7 @@ ColumnLayout {
Opaque.IconTextField {
id: filter
visible:listpanel.online
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
width: parent.width - 2 * Theme.paddingStandard
//: ex: "Find..."
placeholderText: qsTr("search-list")
@ -54,14 +52,14 @@ ColumnLayout {
height: 150
width: 150
}
Label {
visible:!listpanel.online
color: Theme.mainTextColor
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
elide: Text.ElideRight
font.pixelSize: 18 * gcd.themeScale
text: qsTr("peer-not-online")
}
// Label {
// visible:!listpanel.online
// color: Theme.mainTextColor
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
// elide: Text.ElideRight
// font.pixelSize: 18 * gcd.themeScale
// text: qsTr("peer-not-online")
// }
@ -212,9 +210,7 @@ ColumnLayout {
button_text: qsTr("add-list-item-btn")
dropShadowColor: Theme.dropShadowPaneColor
property int nextMessageID: 1
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
width: parent.width - 2 * Theme.paddingStandard
onClicked: {
if (newlistitem.text != "") {

View File

@ -26,7 +26,6 @@ Rectangle {
groupNameCreate.text = ""
groupAddr.text = ""
groupNameJoin.text = ""
onionLabel.text = gcd.selectedProfile
}
@ -37,14 +36,14 @@ Rectangle {
leftPadding: 20 * gcd.themeScale
rightPadding: 20 * gcd.themeScale
Opaque.ScalingLabel {
Opaque.Label {
id: shareLabel
anchors {
left: parent.left
right: parent.right
}
horizontalAlignment:Text.AlignHCenter
size: Theme.secondaryTextSize
size: Theme.textSmallPt
wrapMode: Text.Wrap
//: Send this address to peers you want to connect with
@ -147,7 +146,7 @@ Rectangle {
Column {
visible: gcd.experimentsEnabled && Utils.checkMap(gcd.experiments, "tapir-groups-experiment")
width: parent.width / 2
Opaque.ScalingLabel {
Opaque.Label {
//: Server
text: qsTr("server")
}
@ -156,7 +155,7 @@ Rectangle {
Column {
visible: gcd.experimentsEnabled && Utils.checkMap(gcd.experiments, "tapir-groups-experiment")
width: parent.width / 2
Opaque.ScalingLabel {
Opaque.Label {
//: Invitation
text: qsTr("invitation")
}

View File

@ -14,7 +14,6 @@ import "../const"
Opaque.SettingsList { // groupSettingsPane
id: gsp
anchors.fill: parent
property string groupID
property variant addrbook
property bool connected: false
@ -77,7 +76,7 @@ Opaque.SettingsList { // groupSettingsPane
}
Opaque.Setting {
property color backgroundColor: parent.color
property color backgroundColor: "red"//parent.color
inline: true
label: qsTr("server-info")
field: Column {
@ -86,7 +85,7 @@ Opaque.SettingsList { // groupSettingsPane
RowLayout {
width: parent.width
Layout.fillWidth: true
Opaque.ScalingLabel {
Opaque.Label {
text: gsp.connected ? qsTr("server-connectivity-connected") : qsTr("server-connectivity-disconnected")
Layout.alignment: Qt.AlignLeft
}
@ -104,7 +103,7 @@ Opaque.SettingsList { // groupSettingsPane
width: parent.width
Layout.fillWidth: true
Opaque.ScalingLabel {
Opaque.Label {
text: gsp.synced ? qsTr("server-synced") : qsTr("server-not-synced")
Layout.alignment: Qt.AlignLeft
}

View File

@ -30,6 +30,7 @@ ColumnLayout {
StackLayout {
id: overlayStack
Layout.fillWidth: true
Layout.fillHeight: true
width: parent.width
@ -44,23 +45,23 @@ ColumnLayout {
ChatOverlay { //0
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
// Layout.maximumHeight: overlayStack.height
// Layout.maximumWidth: overlayStack.width
}
ListOverlay{ //1
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
// Layout.maximumHeight: overlayStack.height
// Layout.maximumWidth: overlayStack.width
}
BulletinOverlay{ //2
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
// Layout.maximumHeight: overlayStack.height
// Layout.maximumWidth: overlayStack.width
}
MembershipOverlay { //3
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
// Layout.maximumHeight: overlayStack.height
// Layout.maximumWidth: overlayStack.width
}
}

View File

@ -14,8 +14,6 @@ import "../const"
Opaque.SettingsList { // settingsPane
id: root
anchors.fill: parent
anchors.topMargin: 20
width: parent.width
height: parent.height
contentHeight: peerSettings.height + 20
@ -80,8 +78,8 @@ Opaque.SettingsList { // settingsPane
field: Opaque.ToggleSwitch {
anchors.right: parent.right
isToggled: root.authorization == Const.auth_blocked
onToggled: function() {
checked: root.authorization == Const.auth_blocked
onCheckedChanged: function() {
if (root.authorization == Const.auth_blocked) {
root.authorization = Const.auth_unknown
gcd.setPeerAuthorization(txtOnion.text, Const.auth_unknown)

View File

@ -103,9 +103,9 @@ Opaque.Flickable {
width: 400 * gcd.themeScale
spacing: 10 * gcd.themeScale
Opaque.ScalingLabel {
Opaque.Label {
anchors.horizontalCenter: parent.horizontalCenter
size: Theme.primaryTextSize
size: Theme.textMediumPt
//: New Profile || Edit Profile
text: mode == mode_add ? qsTr("new-profile") : qsTr("edit-profile")
@ -122,9 +122,8 @@ Opaque.Flickable {
Opaque.Portrait {
id: portrait
size: 250
Layout.preferredHeight: size
Layout.preferredHeight: implicitHeight
Layout.preferredWidth: implicitWidth
anchors.horizontalCenter: parent.horizontalCenter
portraitBorderColor: Theme.portraitOnlineBorderColor
@ -136,18 +135,18 @@ Opaque.Flickable {
badgeContent: Image {// Profle Type
id: profiletype
source: radioUsePassword.checked ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock-open-24px.webp"
height: 40 * gcd.themeScale
source: radioUsePassword.checked ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock_open-24px.webp"
height: Theme.uiIconSizeS
width: height
}
}
Opaque.ScalingLabel {
Opaque.Label {
id: nameLabel
visible: mode == mode_edit
anchors.horizontalCenter: parent.horizontalCenter
size: Theme.primaryTextSize
size: Theme.textMediumPt
bold: true
}
@ -159,10 +158,10 @@ Opaque.Flickable {
color: Theme.backgroundPaneColor
}
Opaque.ScalingLabel {
Opaque.Label {
visible: mode == mode_edit
anchors.horizontalCenter: parent.horizontalCenter
size: Theme.secondaryTextSize
size: Theme.textSmallPt
//: Send this address to peers you want to connect with
text: qsTr("profile-oniblon-label")
@ -200,10 +199,10 @@ Opaque.Flickable {
color: leftCol.color
anchors.horizontalCenter: parent.horizontalCenter
Opaque.ScalingLabel {
Opaque.Label {
id: noPasswordLabel
width: parent.width
size: Theme.secondaryTextSize
size: Theme.textSmallPt
anchors.horizontalCenter: parent.horizontalCenter
//: Not using a password on this account means that all data stored locally will not be encrypted
@ -342,10 +341,10 @@ Opaque.Flickable {
}
Opaque.ScalingLabel {
Opaque.Label {
id: passwordErrorLabel
anchors.horizontalCenter: parent.horizontalCenter
size: Theme.secondaryTextSize
size: Theme.textSmallPt
//: Passwords do not match
text: txtPassword1.text.length == 0 ? qsTr("password-error-empty") : qsTr("password-error-match")
@ -353,10 +352,10 @@ Opaque.Flickable {
color: Theme.textfieldErrorColor
}
Opaque.ScalingLabel {
Opaque.Label {
id: passwordChangeErrorLabel
anchors.horizontalCenter: parent.horizontalCenter
size: Theme.secondaryTextSize
size: Theme.textSmallPt
//: Error changing password: Supplied password rejected
text: qsTr("password-change-error")
@ -366,7 +365,7 @@ Opaque.Flickable {
Opaque.Button { // ADD or SAVE button
height: Theme.primaryTextSize * 1.5
//height: Theme.primaryTextSize * 1.5
anchors.horizontalCenter: parent.horizontalCenter
@ -418,7 +417,7 @@ Opaque.Flickable {
text: qsTr("delete-profile-btn")
//icon: "regular/trash-alt"
visible: mode == mode_edit
height: Theme.primaryTextSize * 1.5
//height: Theme.primaryTextSize * 1.5
onClicked: {
@ -426,9 +425,9 @@ Opaque.Flickable {
}
}
Opaque.ScalingLabel {
Opaque.Label {
id: deleteConfirmLabel
size: Theme.secondaryTextSize
size: Theme.textSmallPt
anchors.right: parent.right
anchors.rightMargin: 20 * gcd.themeScale

View File

@ -22,30 +22,28 @@ ColumnLayout {
id: thecol
anchors.fill: parent
spacing: 20 * gcd.themeScale
spacing: Theme.paddingSmall
Opaque.ScalingLabel {
Layout.alignment: Qt.AlignHCenter
wrapMode: TextEdit.Wrap
size: Theme.primaryTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
Opaque.Label {
horizontalAlignment: Text.AlignHCenter
width: parent.width
Layout.fillWidth: true
bold: true
//: Enter a password to view your profiles
text: qsTr("enter-profile-password")
}
RowLayout {
width: 700 * gcd.themeScale
//width: 700 * gcd.themeScale
Layout.alignment: Qt.AlignHCenter
Opaque.UnderlineTextField {
id: txtPassword
//anchors.horizontalCenter: parent.horizontalCenter
//Layout.fillWidth: true
Layout.maximumWidth: 450 * gcd.themeScale
Layout.minimumWidth: 450 * gcd.themeScale
//Layout.maximumWidth: 450 * gcd.themeScale
//Layout.minimumWidth: 450 * gcd.themeScale
Layout.rightMargin: 40
Layout.leftMargin: 40
@ -56,8 +54,6 @@ ColumnLayout {
Opaque.Button {
id: "button"
width: 100 * gcd.themeScale
height: Theme.primaryTextSize * gcd.themeScale
//: Unlock
text: qsTr("unlock")
@ -70,7 +66,7 @@ ColumnLayout {
}
}
Opaque.ScalingLabel {
Opaque.Label {
id: error
Layout.alignment: Qt.AlignHCenter
color: Theme.textfieldErrorColor
@ -106,11 +102,10 @@ ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
Opaque.ScalingLabel {
Opaque.Label {
id: profileLabel
size: Theme.subHeaderSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
size: Theme.textSubHeaderPt
bold: true
anchors.left: parent.left
anchors.leftMargin: 25 * gcd.themeScale
bottomPadding: 10 * gcd.themeScale
@ -135,14 +130,13 @@ ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
Opaque.ScalingLabel {
Opaque.Label {
id: serverLabel
size: Theme.subHeaderSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
size: Theme.textSubHeaderPt
bold: true
anchors.left: parent.left
anchors.leftMargin: 25 * gcd.themeScale
bottomPadding: 10 * gcd.themeScale
anchors.leftMargin: Theme.paddingStandard
bottomPadding: Theme.paddingSmall
//: Your Profiles
text: qsTr("your-servers")

View File

@ -39,9 +39,9 @@ Opaque.SettingsList { // Add Profile Pane
anchors.horizontalCenter: parent.horizontalCenter
width: 700
Opaque.ScalingLabel {
Opaque.Label {
text: server_name
size: 16
header: true
}
Opaque.Setting {
@ -51,9 +51,9 @@ Opaque.SettingsList { // Add Profile Pane
field: Opaque.ToggleSwitch {
anchors.right: parent.right
isToggled: serverAddEditPane.server_available
onToggled: function() {
serverAddEditPane.server_available = !serverAddEditPane.server_available
checked: serverAddEditPane.server_available
onCheckedChanged: function() {
//serverAddEditPane.server_available = !serverAddEditPane.server_available
if (serverAddEditPane.server_available) {
gcd.startServer(serverAddEditPane.server_name)
} else {
@ -75,9 +75,9 @@ Opaque.SettingsList { // Add Profile Pane
field: Opaque.ToggleSwitch {
anchors.right: parent.right
isToggled: serverAddEditPane.autostart_server
onToggled: function() {
serverAddEditPane.autostart_server = !serverAddEditPane.autostart_server
checked: serverAddEditPane.autostart_server
onCheckedChanged: function() {
//serverAddEditPane.autostart_server = !serverAddEditPane.autostart_server
gcd.autostartServer(serverAddEditPane.server_name, serverAddEditPane.autostart_server)
}
}

View File

@ -14,9 +14,8 @@ import "../const"
Opaque.SettingsList { // groupSettingsPane
id: gsp
anchors.fill: parent
property string serverName
property color backgroundColor: parent.color
property color backgroundColor: "red"//parent.color??
property bool connected: false
property bool synced: false
@ -66,11 +65,11 @@ Opaque.SettingsList { // groupSettingsPane
onSupplyServerSettings: function(server, key_names, keys) {
gsp.serverName = server;
toolbar.setTitle(qsTr("server-settings"));
console.log("Servers: " + key_names);
for (let i=0; i<key_names.length;i++) {
// TODO: Actually do something with these keys
console.log("FOUND SERVER KEY " + key_names[i] + " " + keys[i]);
}
// console.log("Servers: " + key_names);
// for (let i=0; i<key_names.length;i++) {
// // TODO: Actually do something with these keys
// console.log("FOUND SERVER KEY " + key_names[i] + " " + keys[i]);
// }
}
}

View File

@ -24,8 +24,10 @@ Opaque.SettingsList { // settingsPane
Column {
id: settings
anchors.horizontalCenter: parent.horizontalCenter
width:parent.width -20
parent:root.contentItem
width: parent.width - 20
parent: root.contentItem
padding: Theme.paddingStandard
spacing: Theme.paddingSmall
Opaque.Setting {
@ -64,37 +66,43 @@ Opaque.SettingsList { // settingsPane
//: Interface Zoom
label: qsTr("setting-interface-zoom")
field: Row {
field: Column {
spacing: 10
anchors.verticalCenter: parent.verticalCenter
Opaque.ScalingLabel {
text: qsTr("small-text-label")
size: 8
}
Opaque.Slider {
id: zoomSlider
from: 0.5
to: 4.0
value: gcd.themeScale
live: false
from: 0
to: 4
value: gcd.themeScaleNew
snapMode: Slider.SnapAlways
stepSize: 0.25
stepSize: 1
onValueChanged: {
gcd.themeScale = zoomSlider.value
windowItem.width = windowItem.width
gcd.themeScale = 1.0
gcd.themeScaleNew = zoomSlider.value
}
width: 200
}
Opaque.ScalingLabel {
anchors.verticalCenter: parent.verticalCenter
wrapMode: TextEdit.Wrap
text: qsTr("large-text-label")
size: 20
}
Row {
Opaque.Label {
//: small text
text: qsTr("small-text-label") + " "
size: Theme.textSmallPt
}
Opaque.Label {
//: medium text
text: qsTr("medium-text-label") + " "
size: Theme.textMediumPt
}
Opaque.Label {
//: large text
text: qsTr("large-text-label")
size: Theme.textLargePt
}
}
}
}
@ -125,50 +133,117 @@ Opaque.SettingsList { // settingsPane
}
}
// Experimental Gating
Opaque.Setting {
//: Enable experiments
label: qsTr("experiments-enabled")
Opaque.Setting {
//: Theme
label: qsTr("experiments-enabled")
field: Opaque.ToggleSwitch {
anchors.right: parent.right
id: experimentsEnabledToggle
checked: gcd.experimentsEnabled
onCheckedChanged: gcd.experimentsEnabled = checked
}
}
field: Opaque.ToggleSwitch {
anchors.right: parent.right
id: experimentsEnabledToggle
isToggled: gcd.experimentsEnabled
onToggled: function() {
console.log("experiments enabled: " + gcd.experimentsEnabled + " " + experimentsEnabledToggle.isToggled) ;
if (gcd.experimentsEnabled == false) {
gcd.experimentsEnabled = true;
} else {
gcd.experimentsEnabled = false;
}
}
}
}
Widgets.ExperimentToggle {
name: "servers_enabled"
experiment_id: "tapir-servers-experiment"
}
Widgets.ExperimentToggle {
name: "servers_enabled"
experiment_id: "tapir-servers-experiment"
}
Widgets.ExperimentToggle {
name: "groups_enabled"
experiment_id: "tapir-groups-experiment"
}
Widgets.ExperimentToggle {
name: "groups_enabled"
experiment_id: "tapir-groups-experiment"
}
Opaque.ScalingLabel {
id: versionLabel
anchors.horizontalCenter: parent.horizontalCenter
//: Version %1 with tor %2
text: qsTr("version %1 tor %2").arg(gcd.version).arg(gcd.torVersion)
}
Opaque.Collapser {
textShow: qsTr("Text magnification reference")
textHide: textShow
Opaque.ScalingLabel {
id: builddateLabel
anchors.horizontalCenter: parent.horizontalCenter
//: Built on: %2
text: qsTr("builddate %2").arg(gcd.buildDate)
}
Opaque.Label {
text: "compact header"
size: Theme.textHeaderPtBase[0]
bold: true
}
Opaque.Label {
text: "compact small text"
size: Theme.textSmallPtBase[0]
}
Opaque.Label {
text: "compact medium text"
size: Theme.textMediumPtBase[0]
}
Opaque.Label {
text: "compact large text"
size: Theme.textLargePtBase[0]
}
Opaque.Label {
text: "normal header"
size: Theme.textHeaderPtBase[1]
bold: true
}
Opaque.Label {
text: "normal small text"
size: Theme.textSmallPtBase[1]
}
Opaque.Label {
text: "normal medium text"
size: Theme.textMediumPtBase[1]
}
Opaque.Label {
text: "normal large text"
size: Theme.textLargePtBase[1]
}
Opaque.Label {
text: "magnified header"
size: Theme.textHeaderPtBase[2]
bold: true
}
Opaque.Label {
text: "magnified small text"
size: Theme.textSmallPtBase[2]
}
Opaque.Label {
text: "magnified medium text"
size: Theme.textMediumPtBase[2]
}
Opaque.Label {
text: "magnified large text"
size: Theme.textLargePtBase[2]
}
}
Opaque.Collapser {
textShow: qsTr("Acknowledgements")
textHide: textShow
Opaque.Label {
//: don't translate yet... we should come up with something to write here as a team<3
text: qsTr("extra special thanks!!!!")
}
Opaque.Label {
text: "dependencies, licenses?\nprofile icon pics\nfontawesome? other icon sources?\nmutant standard\nadobe blank\nopensans?"
}
}
// todo: found this -60 by trial and error. not sure of derivation
Opaque.HLine{width:parent.width-padding*2-60}
Opaque.Label {
id: versionLabel
anchors.horizontalCenter: parent.horizontalCenter
//: Version %1 with tor %2
text: qsTr("version %1 tor %2").arg(gcd.version).arg(gcd.torVersion)
size: Theme.textSmallPt
}
Opaque.Label {
id: builddateLabel
anchors.horizontalCenter: parent.horizontalCenter
//: Built on: %2
text: qsTr("builddate %2").arg(gcd.buildDate)
size: Theme.textSmallPt
}
}

View File

@ -37,7 +37,7 @@ Item {
}
Opaque.ScalingLabel {
Opaque.Label {
id: loadingLabel
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: splashImage.bottom
@ -46,8 +46,7 @@ Item {
//: Loading tor...
text: qsTr("loading-tor")
size: Theme.secondaryTextSize
color: Theme.mainTextColor
size: Theme.textSmallPt
}
Image {

View File

@ -14,18 +14,10 @@ ColumnLayout {
property alias dualPane: myprof.dualPane
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
spacing: 10
MouseArea {
anchors.fill: parent
onClicked: {
forceActiveFocus()
}
}
MyProfile { // CURRENT PROFILE INFO AND CONTROL BAR
id: myprof
width: root.width
Layout.fillWidth: true
}
function filterContact(displayName, handle) {
@ -45,20 +37,15 @@ ColumnLayout {
Opaque.IconTextField {
id: searchAddText
anchors.horizontalCenter: parent.horizontalCenter
Layout.minimumWidth: parent.width - 60
Layout.maximumWidth: parent.width - 60
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.margins: Theme.paddingStandard
//: ex: "... paste an address here to add a contact ..."
//placeholderText: qsTr("paste-address-to-add-contact")
horizontalAlignment: TextInput.AlignHCenter
icon: gcd.assetPath + "core/search-24px.webp"
onTextChanged: {
// TODO: detect peer or group address and insert a contactRow that asks to add the corresponding group or peer
/*if (text != "") {
@ -234,19 +221,19 @@ ColumnLayout {
bottomPadding: 8 * logscale
spacing: 5 * logscale
Opaque.ScalingLabel {
Opaque.Label {
id: blockLbl
text: qsTr("blocked")
size: Theme.chatMetaTextSize
size: Theme.textSmallPt
color: Theme.portraitBlockedTextColor
}
Opaque.ScalingLabel {
Opaque.Label {
id: blockBtn
text: blockedToggle.showing ? "▲" : "▼"
size: Theme.chatMetaTextSize
size: Theme.textSmallPt
color: Theme.portraitBlockedTextColor
}
}

View File

@ -92,7 +92,7 @@ Opaque.PortraitRow {
height: 18 * gcd.themeScale
width: 18 * gcd.themeScale
onClicked: { console.log("approve"); gcd.setPeerAuthorization(handle, Const.auth_blocked)}
onClicked: gcd.setPeerAuthorization(handle, Const.auth_blocked)
}
}

View File

@ -4,21 +4,21 @@ import "../opaque/theme"
import "../utils.js" as Utils
Opaque.Setting {
//: Theme
id: experiment
property string name;
property string experiment_id;
property string name
property string experiment_id
visible: gcd.experimentsEnabled
//: [todo]
label: qsTr(name)
field: Opaque.ToggleSwitch {
anchors.right: parent.right
id: expToggle
isToggled: Utils.checkMap(gcd.experiments, experiment.experiment_id)
onToggled: function() {
let experimentsMap = Utils.buildMap(gcd.experiments);
experimentsMap[experiment.experiment_id] = expToggle.isToggled ? false : true;
gcd.experiments = experimentsMap;
checked: Utils.checkMap(gcd.experiments, experiment.experiment_id)
onCheckedChanged: function() {
let experimentsMap = Utils.buildMap(gcd.experiments)
experimentsMap[experiment.experiment_id] = checked
gcd.experiments = experimentsMap
}
}
}

View File

@ -55,7 +55,8 @@ Rectangle {
visible: !fromMe && !calendarEvent
size: fromMe || calendarEvent ? 0 : Theme.contactPortraitSize * 0.5
width: fromMe || calendarEvent ? 0 : implicitWidth * 0.5
height: implicitHeight * 0.5
badgeVisible: false
@ -110,7 +111,7 @@ Rectangle {
color: parent.color
}
Label {
Opaque.Label {
id: handle
visible: !fromMe && !calendarEvent
@ -119,13 +120,12 @@ Rectangle {
color: Theme.messageFromOtherTextColor
elide: Text.ElideRight
width: parent.width - 20 // padding
font.pixelSize: Theme.chatSize * gcd.themeScale
font.weight: Font.Bold
font.family: Fonts.applicationFontBold.name
font.styleName: "Bold"
leftPadding: 10 * gcd.themeScale
topPadding: 10 * gcd.themeScale
width: parent.width - leftPadding - rightPadding // padding
size: Theme.chatSize
bold: true
leftPadding: Theme.paddingSmall
rightPadding: Theme.paddingSmall
topPadding: Theme.paddingSmall
}
Column {
@ -149,11 +149,11 @@ Rectangle {
TextEdit { // this is the actual text display
id: lbl
text: parse(message, 12, true)
text: parse(message, Theme.uiEmojiSize, true)
color: fromMe ? Theme.messageFromMeTextColor : Theme.messageFromOtherTextColor
padding: 6 * gcd.themeScale
leftPadding: 10 * gcd.themeScale
font.pixelSize: gcd.themeScale * Theme.chatSize
padding: Theme.paddingSmall
leftPadding: Theme.paddingStandard
font.pointSize: Theme.textSmallPt
selectByMouse: gcd.os != "android"
readOnly: true
width: Math.min(dummy.width, root.parent.width - (imgProfile.visible ? imgProfile.width : 0) - 40)
@ -166,22 +166,22 @@ Rectangle {
anchors.right: parent.right
visible: !calendarEvent
Opaque.ScalingLabel { // TIMESTAMP
Opaque.Label { // TIMESTAMP
id: ts
text: Qt.formatDateTime(new Date(root.timestamp*1000), "h:mm ap")
color: fromMe ? Theme.messageFromMeTextColor : Theme.messageFromOtherTextColor
font.pixelSize: Theme.chatMetaTextSize * gcd.themeScale
size: Theme.textSmallPt
rightPadding: 10
}
Image { // ACKNOWLEDGEMENT ICON
id: ack
source: root.error != "" ? gcd.assetPath + "core/fontawesome/regular/window-close.webp" : (root.ackd ? gcd.assetPath + "core/fontawesome/regular/check-circle.webp" : gcd.assetPath + "core/fontawesome/regular/hourglass.svg")
height: Theme.chatMetaTextSize * gcd.themeScale
width: Theme.chatMetaTextSize * gcd.themeScale
height: Theme.uiIconSizeS
width: Theme.uiIconSizeS
anchors.bottom: parent.bottom
sourceSize.height: Theme.chatMetaTextSize * gcd.themeScale
sourceSize.height: Theme.uiIconSizeS
visible: fromMe
ToolTip.visible: ma.containsMouse
ToolTip.delay: 200

View File

@ -75,7 +75,7 @@ ColumnLayout {
implicitHeight: height
color: Theme.dividerColor
Opaque.ScalingLabel {
Opaque.Label {
id: statusText
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
@ -85,9 +85,8 @@ ColumnLayout {
wrapMode: Text.NoWrap
text: ""
visible: text != ""
size: Theme.chatMetaTextSize
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
size: Theme.textSmallPt
bold: true
}
}

View File

@ -13,13 +13,13 @@ import "../opaque/theme"
import "../opaque/fonts"
import "../const"
// usage: needs a width
Item {
id: root
anchors.fill: parent
width: parent.width
height: profile.height
implicitHeight: profile.height
width: 100
height: implicitHeight
implicitHeight: (dualPane ? 1 : 3) * Theme.contactPortraitSize + 2 * Theme.paddingStandard // + nameMetric.height
property string image
property string nick
@ -28,124 +28,77 @@ Item {
property bool dualPane: false
property bool profileOnline: false
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
onDualPaneChanged: { realignProfile() }
function realignProfile() {
if (dualPane) {
profile.height = Theme.contactPortraitSize * logscale
portrait.anchors.horizontalCenter = undefined
portrait.anchors.left = profile.left
portrait.anchors.leftMargin = 25 * logscale
portrait.size = Theme.contactPortraitSize * logscale
profiletype.height = Theme.badgeTextSize * gcd.themeScale
nameRow.anchors.right = undefined
nameRow.anchors.left = portrait.right
nameRow.anchors.top = undefined
nameRow.anchors.verticalCenter = portrait.verticalCenter
nameCenter.anchors.horizontalCenter = undefined
nameCenter.anchors.left = nameRow.left
} else {
profile.height = (Theme.contactPortraitSize * 2 * logscale)
portrait.anchors.left = undefined
portrait.anchors.leftMargin = undefined
portrait.anchors.horizontalCenter = profile.horizontalCenter
portrait.size = Theme.contactPortraitSize * 1.5
profiletype.height = Theme.badgeTextSize * gcd.themeScale * 1.5
nameRow.anchors.left = profile.left
nameRow.anchors.right = profile.right
nameRow.anchors.verticalCenter = undefined
nameRow.anchors.top = portrait.bottom
nameCenter.anchors.left = undefined
nameCenter.anchors.horizontalCenter = nameRow.horizontalCenter
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
width: parent.width
id: profile
anchors.fill: parent
color: Theme.backgroundMainColor
Opaque.Portrait {
id: portrait
Opaque.Portrait {
id: portrait
anchors.horizontalCenter: root.dualPane ? undefined : parent.horizontalCenter
//anchors.left: root.dualPane ? parent.left : undefined
anchors.bottom: root.dualPane ? undefined : parent.verticalCenter
source: root.image
source: root.image
width: (root.dualPane ? 1 : 2) * Theme.contactPortraitSize
height: width
badgeColor: Theme.portraitProfileBadgeColor
portraitBorderColor: Theme.portraitOnlineBorderColor
portraitColor: Theme.portraitOnlineBackgroundColor
badgeColor: Theme.portraitProfileBadgeColor
portraitBorderColor: Theme.portraitOnlineBorderColor
portraitColor: Theme.portraitOnlineBackgroundColor
badgeContent: Opaque.Icon {// Profle Type
id: profiletype
source: tag == "v1-userPassword" ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock_open-24px.webp"
height: Theme.badgeTextSize * gcd.themeScale
width: height
badgeContent: Opaque.Icon {// Profle Type
id: profiletype
source: tag == "v1-userPassword" ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock_open-24px.webp"
height: Theme.badgeTextSize
width: height
iconColor: Theme.defaultButtonTextColor
backgroundColor: portrait.badgeColor
hilightBackgroundColor: portrait.badgeColor
}
}
iconColor: Theme.defaultButtonTextColor
backgroundColor: portrait.badgeColor
hilightBackgroundColor: portrait.badgeColor
}
}
Rectangle {
id: nameRow
height: name.height
color: Theme.backgroundMainColor
Opaque.Label {
id: name
anchors.left: root.dualPane ? portrait.right : undefined
anchors.top: root.dualPane ? undefined : parent.verticalCenter
anchors.verticalCenter: root.dualPane ? portrait.verticalCenter : undefined
Rectangle {
id: nameCenter
width: name.width + addBtn.width
property real rem: parent.width - portrait.width - addBtn.width
width: root.dualPane ? Math.min(rem, nameMetric.width) : nameMetric.width + 6
//horizontalAlignment: root.dualPane ? Text.AlignLeft : Text.AlignCenter
anchors.horizontalCenter: root.dualPane ? undefined : parent.horizontalCenter
Label {
id: name
color: Theme.portraitOnlineTextColor
multiline: false
header: true
text: root.nick
}
color: Theme.portraitOnlineTextColor
elide: Text.ElideRight
font.pixelSize: Theme.usernameSize * gcd.themeScale
font.weight: Font.Bold
font.family: Fonts.applicationFontExtraBold.name
font.styleName: "ExtraBold"
text: nick
}
TextMetrics {
id: nameMetric
font: name.font
text: root.nick
}
Opaque.Button { // Add Button
id: addBtn
Opaque.Button { // Add Button
id: addBtn
anchors.left: name.right
anchors.top: name.top
anchors.leftMargin: 10 * gcd.themeScale
anchors.left: name.right
anchors.verticalCenter: name.verticalCenter
anchors.top: name.top
anchors.leftMargin: Theme.paddingSmall
icon: "fontawesome/solid/plus"
height: name.height
width: height
radius: width * 0.3
onClicked: {
theStack.currentIndex = theStack.addPeerGroupPane
}
}
}
}
icon: "fontawesome/solid/plus"
height: Theme.uiIconSizeM
width: Theme.uiIconSizeM
radius: width * 0.3
onClicked: {
theStack.currentIndex = theStack.addPeerGroupPane
}
}
}
function updateStatus() {
@ -182,8 +135,6 @@ Item {
updateStatus()
}
onResetProfile: { realignProfile() }
onTorStatusChanged: function() {
updateStatus()
}

View File

@ -10,14 +10,6 @@ import "../opaque/theme"
ColumnLayout {
id: root
MouseArea {
anchors.fill: parent
onClicked: {
forceActiveFocus()
}
}
Opaque.Flickable { // Profile List
id: sv
Layout.minimumHeight: 100
@ -129,8 +121,6 @@ ColumnLayout {
onClicked: function(handle) { profileAddEditPane.reset(); parentStack.pane = parentStack.addEditProfilePane }
}
}
}
}

View File

@ -104,7 +104,7 @@ RowLayout {
hilightBackgroundColor: Theme.backgroundHilightElementColor
iconColor: Theme.altTextColor
anchors.verticalCenter: parent.verticalCenter
//anchors.verticalCenter: parent.verticalCenter
// Layout.alignment: Qt.AlignVCenter
@ -114,9 +114,5 @@ RowLayout {
onClicked: editClicked(handle, displayName, tag, image)
}
}

View File

@ -10,14 +10,6 @@ import "../opaque/theme"
ColumnLayout {
id: root
MouseArea {
anchors.fill: parent
onClicked: {
forceActiveFocus()
}
}
Opaque.Flickable { // Profile List
id: sv
Layout.minimumHeight: 100
@ -72,9 +64,9 @@ ColumnLayout {
})
}
onResetServerList: function() {
serversModel.clear()
}
// onResetServerList: function() {
// serversModel.clear()
// }
}
ListModel { // Profile OBJECTS ARE STORED HERE ...