@@ -43,9 +43,11 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage(OwncloudWizard *wizard)
4343 , _ocWizard(wizard)
4444{
4545 _ui.setupUi (this );
46-
4746 setupResoultionWidget ();
4847
48+ _filePathLabel.reset (new ElidedFilePathLabel);
49+ _ui.locationsGridLayout ->addWidget (_filePathLabel.data (), 3 , 3 );
50+
4951 registerField (QLatin1String (" OCSyncFromScratch" ), _ui.cbSyncFromScratch );
5052
5153 auto sizePolicy = _progressIndi->sizePolicy ();
@@ -116,6 +118,7 @@ void OwncloudAdvancedSetupPage::setupCustomization()
116118 variant = theme->customMedia (Theme::oCSetupBottom);
117119 WizardCommon::setupCustomMedia (variant, _ui.bottomLabel );
118120
121+ WizardCommon::customizeHintLabel (_filePathLabel.data ());
119122 WizardCommon::customizeHintLabel (_ui.lFreeSpace );
120123 WizardCommon::customizeHintLabel (_ui.lSyncEverythingSizeLabel );
121124 WizardCommon::customizeHintLabel (_ui.lSelectiveSyncSizeLabel );
@@ -188,10 +191,11 @@ void OwncloudAdvancedSetupPage::fetchUserAvatar()
188191{
189192 // Reset user avatar
190193 const auto appIcon = Theme::instance ()->applicationIcon ();
191- _ui.lServerIcon ->setPixmap (appIcon.pixmap (48 ));
194+ // To match the folder icon opposite the avatar -- that is 60x60, minus padding
195+ _ui.lServerIcon ->setPixmap (appIcon.pixmap (32 ));
192196 // Fetch user avatar
193197 const auto account = _ocWizard->account ();
194- auto avatarSize = 64 ;
198+ auto avatarSize = 32 ;
195199 if (Theme::isHidpi ()) {
196200 avatarSize *= 2 ;
197201 }
@@ -256,8 +260,6 @@ void OwncloudAdvancedSetupPage::updateStatus()
256260
257261 QString t;
258262
259- setLocalFolderPushButtonPath (locFolder);
260-
261263 if (dataChanged ()) {
262264 if (_remoteFolder.isEmpty () || _remoteFolder == QLatin1String (" /" )) {
263265 t = " " ;
@@ -277,6 +279,8 @@ void OwncloudAdvancedSetupPage::updateStatus()
277279 setResolutionGuiVisible (false );
278280 }
279281
282+ _filePathLabel->setFilePath (locFolder);
283+
280284 QString lfreeSpaceStr = Utility::octetsToString (availableLocalSpace ());
281285 _ui.lFreeSpace ->setText (QString (tr (" %1 free space" , " %1 gets replaced with the size and a matching unit. Example: 3 MB or 5 GB" )).arg (lfreeSpaceStr));
282286
@@ -428,7 +432,6 @@ void OwncloudAdvancedSetupPage::slotSelectFolder()
428432 // TODO: remove when UX decision is made
429433 refreshVirtualFilesAvailibility (dir);
430434
431- setLocalFolderPushButtonPath (dir);
432435 wizard ()->setProperty (" localFolder" , dir);
433436 updateStatus ();
434437 }
@@ -438,22 +441,6 @@ void OwncloudAdvancedSetupPage::slotSelectFolder()
438441 setErrorString (errorStr);
439442}
440443
441-
442- void OwncloudAdvancedSetupPage::setLocalFolderPushButtonPath (const QString &path)
443- {
444- const auto homeDir = QDir::homePath ().endsWith (' /' ) ? QDir::homePath () : QDir::homePath () + QLatin1Char (' /' );
445-
446- if (!path.startsWith (homeDir)) {
447- _ui.pbSelectLocalFolder ->setText (QDir::toNativeSeparators (path));
448- return ;
449- }
450-
451- auto prettyPath = path;
452- prettyPath.remove (0 , homeDir.size ());
453-
454- _ui.pbSelectLocalFolder ->setText (QDir::toNativeSeparators (prettyPath));
455- }
456-
457444void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked ()
458445{
459446 AccountPtr acc = static_cast <OwncloudWizard *>(wizard ())->account ();
0 commit comments