new scaling system pass one #457

Open
erinn wants to merge 4 commits from newzoom into master
29 changed files with 501 additions and 460 deletions
Showing only changes of commit 290b0b26db - Show all commits

View File

@ -42,7 +42,12 @@ type GrandCentralDispatcher struct {
_ int `property:"torStatus"` _ int `property:"torStatus"`
_ string `property:"os"` _ string `property:"os"`
_ bool `property:"firstTime"` _ 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"` _ float32 `property:"themeScale,auto,changed"`
_ int `property:"themeScaleNew,auto,changed"`
_ string `property:"theme,auto,changed"` _ string `property:"theme,auto,changed"`
_ string `property:"locale,auto,changed"` _ string `property:"locale,auto,changed"`
_ string `property:"version"` _ string `property:"version"`
@ -159,6 +164,7 @@ func (this *GrandCentralDispatcher) init() {
this.GlobalSettings, firstTime = ReadGlobalSettings() this.GlobalSettings, firstTime = ReadGlobalSettings()
this.SetFirstTime(firstTime) this.SetFirstTime(firstTime)
this.SetThemeScale(this.GlobalSettings.Zoom) this.SetThemeScale(this.GlobalSettings.Zoom)
this.SetThemeScaleNew(this.GlobalSettings.Scale)
this.SetTheme(this.GlobalSettings.Theme) this.SetTheme(this.GlobalSettings.Theme)
this.SetExperimentsEnabled(this.GlobalSettings.ExperimentsEnabled) this.SetExperimentsEnabled(this.GlobalSettings.ExperimentsEnabled)
this.SetExperiments(this.GlobalSettings.Experiments) this.SetExperiments(this.GlobalSettings.Experiments)
@ -779,6 +785,11 @@ func (this *GrandCentralDispatcher) themeScaleChanged(newThemeScale float32) {
WriteGlobalSettings(this.GlobalSettings) WriteGlobalSettings(this.GlobalSettings)
} }
func (this *GrandCentralDispatcher) themeScaleNewChanged(newScale int) {
this.GlobalSettings.Scale = newScale
WriteGlobalSettings(this.GlobalSettings)
}
// Turn on/off global experiments // Turn on/off global experiments
func (this *GrandCentralDispatcher) experimentsEnabledChanged(enabled bool) { func (this *GrandCentralDispatcher) experimentsEnabledChanged(enabled bool) {
this.GlobalSettings.ExperimentsEnabled = enabled this.GlobalSettings.ExperimentsEnabled = enabled

View File

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

View File

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

View File

@ -135,24 +135,35 @@
<context> <context>
<name>ChatOverlay</name> <name>ChatOverlay</name>
<message> <message>
<location filename="../qml/overlays/ChatOverlay.qml" line="83"/> <location filename="../qml/overlays/ChatOverlay.qml" line="75"/>
<source>chat-history-default</source> <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> <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> <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>
<message> <message>
<location filename="../qml/overlays/ChatOverlay.qml" line="85"/> <location filename="../qml/overlays/ChatOverlay.qml" line="77"/>
<source>chat-history-disabled</source> <source>chat-history-disabled</source>
<extracomment>Message history is disabled.</extracomment> <extracomment>Message history is disabled.</extracomment>
<translation>Message history is disabled.</translation> <translation>Message history is disabled.</translation>
</message> </message>
<message> <message>
<location filename="../qml/overlays/ChatOverlay.qml" line="87"/> <location filename="../qml/overlays/ChatOverlay.qml" line="79"/>
<source>chat-history-enabled</source> <source>chat-history-enabled</source>
<extracomment>Message history is enabled.</extracomment> <extracomment>Message history is enabled.</extracomment>
<translation>Message history is enabled.</translation> <translation>Message history is enabled.</translation>
</message> </message>
</context> </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> <context>
<name>ContactList</name> <name>ContactList</name>
<message> <message>
@ -161,7 +172,7 @@
<translation type="vanished">... paste an address here to add a contact...</translation> <translation type="vanished">... paste an address here to add a contact...</translation>
</message> </message>
<message> <message>
<location filename="../qml/widgets/ContactList.qml" line="239"/> <location filename="../qml/widgets/ContactList.qml" line="240"/>
<source>blocked</source> <source>blocked</source>
<translation>Blocked</translation> <translation>Blocked</translation>
</message> </message>
@ -378,18 +389,18 @@ Right-click to reset.</translation>
<translation>Click to DM</translation> <translation>Click to DM</translation>
</message> </message>
<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> <source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment> <extracomment>Could not send this message</extracomment>
<translation>Could not send this message</translation> <translation>Could not send this message</translation>
</message> </message>
<message> <message>
<location filename="../qml/widgets/Message.qml" line="189"/> <location filename="../qml/widgets/Message.qml" line="188"/>
<source>acknowledged-label</source> <source>acknowledged-label</source>
<translation>Acknowledged</translation> <translation>Acknowledged</translation>
</message> </message>
<message> <message>
<location filename="../qml/widgets/Message.qml" line="189"/> <location filename="../qml/widgets/Message.qml" line="188"/>
<source>pending-label</source> <source>pending-label</source>
<translation>Pending</translation> <translation>Pending</translation>
</message> </message>
@ -688,36 +699,36 @@ Right-click to reset.</translation>
<context> <context>
<name>ProfileManagerPane</name> <name>ProfileManagerPane</name>
<message> <message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="36"/> <location filename="../qml/panes/ProfileManagerPane.qml" line="33"/>
<source>enter-profile-password</source> <source>enter-profile-password</source>
<extracomment>Enter a password to view your profiles</extracomment> <extracomment>Enter a password to view your profiles</extracomment>
<translation>Enter a password to view your profiles</translation> <translation>Enter a password to view your profiles</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="52"/> <location filename="../qml/panes/ProfileManagerPane.qml" line="49"/>
<source>password</source> <source>password</source>
<translation>Password</translation> <translation>Password</translation>
</message> </message>
<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> <source>error-0-profiles-loaded-for-password</source>
<extracomment>0 profiles loaded with that password</extracomment> <extracomment>0 profiles loaded with that password</extracomment>
<translation>0 profiles loaded with that password</translation> <translation>0 profiles loaded with that password</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="119"/> <location filename="../qml/panes/ProfileManagerPane.qml" line="115"/>
<source>your-profiles</source> <source>your-profiles</source>
<extracomment>Your Profiles</extracomment> <extracomment>Your Profiles</extracomment>
<translation>Your Profiles</translation> <translation>Your Profiles</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="148"/> <location filename="../qml/panes/ProfileManagerPane.qml" line="143"/>
<source>your-servers</source> <source>your-servers</source>
<extracomment>Your Profiles</extracomment> <extracomment>Your Profiles</extracomment>
<translation>Your Servers</translation> <translation>Your Servers</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/ProfileManagerPane.qml" line="63"/> <location filename="../qml/panes/ProfileManagerPane.qml" line="60"/>
<source>unlock</source> <source>unlock</source>
<extracomment>Unlock</extracomment> <extracomment>Unlock</extracomment>
<translation>Unlock</translation> <translation>Unlock</translation>
@ -777,34 +788,41 @@ Right-click to reset.</translation>
<translation>Zoom level</translation> <translation>Zoom level</translation>
</message> </message>
<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> <source>large-text-label</source>
<extracomment>large text</extracomment>
<translation>Large</translation> <translation>Large</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/> <location filename="../qml/panes/SettingsPane.qml" line="164"/>
<source>setting-theme</source> <source>setting-theme</source>
<extracomment>Theme</extracomment> <extracomment>Theme</extracomment>
<translation>Theme</translation> <translation>Theme</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="112"/> <location filename="../qml/panes/SettingsPane.qml" line="173"/>
<source>theme-light</source> <source>theme-light</source>
<translation>Light</translation> <translation>Light</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="113"/> <location filename="../qml/panes/SettingsPane.qml" line="174"/>
<source>theme-dark</source> <source>theme-dark</source>
<translation>Dark</translation> <translation>Dark</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="132"/> <location filename="../qml/panes/SettingsPane.qml" line="193"/>
<source>experiments-enabled</source> <source>experiments-enabled</source>
<extracomment>Theme</extracomment> <extracomment>Theme</extracomment>
<translation>Experiments enabled</translation> <translation>Experiments enabled</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/> <location filename="../qml/panes/SettingsPane.qml" line="224"/>
<source>version %1 tor %2</source> <source>version %1 tor %2</source>
<extracomment>Version %1 with tor %2</extracomment> <extracomment>Version %1 with tor %2</extracomment>
<translation>Version %1 with tor %2</translation> <translation>Version %1 with tor %2</translation>
@ -815,7 +833,7 @@ Right-click to reset.</translation>
<translation type="vanished">Version %1</translation> <translation type="vanished">Version %1</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="169"/> <location filename="../qml/panes/SettingsPane.qml" line="232"/>
<source>builddate %2</source> <source>builddate %2</source>
<extracomment>Built on: %2</extracomment> <extracomment>Built on: %2</extracomment>
<translation>Built on: %2</translation> <translation>Built on: %2</translation>
@ -826,8 +844,9 @@ Right-click to reset.</translation>
<translation type="vanished">Default size text (scale factor:</translation> <translation type="vanished">Default size text (scale factor:</translation>
</message> </message>
<message> <message>
<location filename="../qml/panes/SettingsPane.qml" line="72"/> <location filename="../qml/panes/SettingsPane.qml" line="91"/>
<source>small-text-label</source> <source>small-text-label</source>
<extracomment>small text</extracomment>
<translation>Small</translation> <translation>Small</translation>
</message> </message>
</context> </context>
@ -878,7 +897,7 @@ Right-click to reset.</translation>
<context> <context>
<name>main</name> <name>main</name>
<message> <message>
<location filename="../qml/main.qml" line="264"/> <location filename="../qml/main.qml" line="265"/>
<source>new-connection-pane-title</source> <source>new-connection-pane-title</source>
<extracomment>New Connection</extracomment> <extracomment>New Connection</extracomment>
<translation>New Connection</translation> <translation>New Connection</translation>

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,8 +24,10 @@ Opaque.SettingsList { // settingsPane
Column { Column {
id: settings id: settings
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width:parent.width -20 width: parent.width - 20
parent:root.contentItem parent: root.contentItem
padding: Theme.paddingStandard
spacing: Theme.paddingSmall
Opaque.Setting { Opaque.Setting {
@ -64,37 +66,43 @@ Opaque.SettingsList { // settingsPane
//: Interface Zoom //: Interface Zoom
label: qsTr("setting-interface-zoom") label: qsTr("setting-interface-zoom")
field: Row { field: Column {
spacing: 10 spacing: 10
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Opaque.ScalingLabel {
text: qsTr("small-text-label")
size: 8
}
Opaque.Slider { Opaque.Slider {
id: zoomSlider id: zoomSlider
from: 0.5 from: 0
to: 4.0 to: 4
value: gcd.themeScale value: gcd.themeScaleNew
live: false
snapMode: Slider.SnapAlways snapMode: Slider.SnapAlways
stepSize: 0.25 stepSize: 1
onValueChanged: { onValueChanged: {
gcd.themeScale = zoomSlider.value windowItem.width = windowItem.width
gcd.themeScale = 1.0
gcd.themeScaleNew = zoomSlider.value
} }
width: 200 width: 200
} }
Row {
Opaque.ScalingLabel { Opaque.Label {
anchors.verticalCenter: parent.verticalCenter //: small text
wrapMode: TextEdit.Wrap text: qsTr("small-text-label") + " "
text: qsTr("large-text-label") size: Theme.textSmallPt
size: 20 }
} 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 { field: Opaque.ToggleSwitch {
//: Theme anchors.right: parent.right
label: qsTr("experiments-enabled") id: experimentsEnabledToggle
checked: gcd.experimentsEnabled
onCheckedChanged: gcd.experimentsEnabled = checked
}
}
field: Opaque.ToggleSwitch { Widgets.ExperimentToggle {
anchors.right: parent.right name: "servers_enabled"
id: experimentsEnabledToggle experiment_id: "tapir-servers-experiment"
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 { Widgets.ExperimentToggle {
name: "servers_enabled" name: "groups_enabled"
experiment_id: "tapir-servers-experiment" experiment_id: "tapir-groups-experiment"
} }
Widgets.ExperimentToggle { Opaque.Collapser {
erinn marked this conversation as resolved
Review

shouldn't this be outside experiments?

shouldn't this be outside experiments?
Review

that would be lovely but ToggleFields can't go in Collapsers for some reason currently lmao

that would be lovely but ToggleFields can't go in Collapsers for some reason currently lmao
name: "groups_enabled" textShow: qsTr("Text magnification reference")
experiment_id: "tapir-groups-experiment" textHide: textShow
}
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.ScalingLabel { Opaque.Label {
id: builddateLabel text: "compact header"
anchors.horizontalCenter: parent.horizontalCenter size: Theme.textHeaderPtBase[0]
//: Built on: %2 bold: true
text: qsTr("builddate %2").arg(gcd.buildDate) }
} 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?"
erinn marked this conversation as resolved
Review

possible lokalise too?

possible lokalise too?
Review

absolutely. and split up by bullet point so we can add/remove individual entries easily. soon!

absolutely. and split up by bullet point so we can add/remove individual entries easily. soon!
}
}
// 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 id: loadingLabel
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: splashImage.bottom anchors.top: splashImage.bottom
@ -46,8 +46,7 @@ Item {
//: Loading tor... //: Loading tor...
text: qsTr("loading-tor") text: qsTr("loading-tor")
size: Theme.secondaryTextSize size: Theme.textSmallPt
color: Theme.mainTextColor
} }
Image { Image {

View File

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

View File

@ -92,7 +92,7 @@ Opaque.PortraitRow {
height: 18 * gcd.themeScale height: 18 * gcd.themeScale
width: 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 import "../utils.js" as Utils
Opaque.Setting { Opaque.Setting {
//: Theme
id: experiment id: experiment
property string name; property string name
property string experiment_id; property string experiment_id
visible: gcd.experimentsEnabled visible: gcd.experimentsEnabled
//: [todo]
label: qsTr(name) label: qsTr(name)
field: Opaque.ToggleSwitch { field: Opaque.ToggleSwitch {
anchors.right: parent.right anchors.right: parent.right
id: expToggle id: expToggle
isToggled: Utils.checkMap(gcd.experiments, experiment.experiment_id) checked: Utils.checkMap(gcd.experiments, experiment.experiment_id)
onToggled: function() { onCheckedChanged: function() {
let experimentsMap = Utils.buildMap(gcd.experiments); let experimentsMap = Utils.buildMap(gcd.experiments)
experimentsMap[experiment.experiment_id] = expToggle.isToggled ? false : true; experimentsMap[experiment.experiment_id] = checked
gcd.experiments = experimentsMap; gcd.experiments = experimentsMap
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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