Skip to content

Commit

Permalink
lookandfeel: Clean authentication dialog
Browse files Browse the repository at this point in the history
Make it work outside the shell.

Issue: #146
  • Loading branch information
plfiorini committed Feb 25, 2014
1 parent 3400087 commit 94330cd
Showing 1 changed file with 5 additions and 16 deletions.
Expand Up @@ -27,10 +27,8 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import QtAccountsService 1.0
import Fluid.Ui 1.0 as FluidUi
import Fluid.Ui.ListItems 1.0 as ListItem
import Hawaii.Shell 1.0
import Hawaii.Shell.Components 1.0

Dialog {
id: authenticationDialog
Expand Down Expand Up @@ -83,15 +81,15 @@ Dialog {
if (avatar == "")
return "image://desktoptheme/avatar-default";

// Prepend the file scheme if this is an absolute path,
// this prevents QtQuick from searching the path from qrc
// Load the image from the disk if it's an absolute path
if (avatar.indexOf("/") == 0)
return "file://" + avatar;
return avatar;

// Load from the icon theme
return "image://desktoptheme/" + avatar;
}
sourceSize: Qt.size(width, height)
sourceSize.width: width
sourceSize.height: height
width: 64
height: 64
smooth: true
Expand Down Expand Up @@ -166,13 +164,4 @@ Dialog {
Layout.fillWidth: true
}
}

function initialize() {
// Initialization
prompt = "";
passwordInput.text = "";
echo = false;
infoMessage = "";
errorMessage = "";
}
}

0 comments on commit 94330cd

Please sign in to comment.