Commit ca944dae authored by camilo higuita's avatar camilo higuita

fixes on models and better missing dialog message

parent 151658d7
......@@ -26,12 +26,12 @@ using namespace BAE;
CollectionDB::CollectionDB(QObject *parent) : QObject(parent)
{
QObject::connect(qApp, &QCoreApplication::aboutToQuit, [this]()
{
this->m_db.close();
this->instance->deleteLater();
this->instance = nullptr;
});
// QObject::connect(qApp, &QCoreApplication::aboutToQuit, [this]()
// {
// this->m_db.close();
// this->instance->deleteLater();
// this->instance = nullptr;
// });
this->name = QUuid::createUuid().toString();
......
......@@ -110,12 +110,11 @@ Maui.ApplicationWindow
onClosing: Player.savePlaylist()
onMissingAlert:
{
var message = track.title + " by " + track.artist + " is missing"
var messageBody = "Do you want to remove it from your collection?"
notify("alert", message, messageBody, function ()
var message = qsTr("Missing file...")
var messageBody = track.title + " by " + track.artist + " is missing.\nDo you want to remove it from your collection?"
notify("dialog-question", message, messageBody, function ()
{
// bae.removeTrack(currentTrack.url) //todo
mainPlaylist.table.model.remove(mainPlaylist.table.currentIndex)
mainPlaylist.list.remove(mainPlaylist.table.currentIndex)
})
}
......
......@@ -118,7 +118,7 @@ void AlbumsModel::setList()
}
});
this->fetchInformation();
//this->fetchInformation();
this->sortList();
emit this->postListChanged();
}
......
......@@ -8,7 +8,7 @@ function playTrack(index)
if(typeof(currentTrack) === "undefined") return
if(Maui.FM.fileExists(currentTrack.url))
if(Maui.FM.fileExists("pp"+currentTrack.url))
{
player.url = currentTrack.url;
player.playing = true
......
......@@ -140,21 +140,7 @@ Maui.ItemDelegate
Kirigami.Theme.backgroundColor: "#333";
Kirigami.Theme.textColor: "#fafafa"
LinearGradient
{
id: mask
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, parent.height)
gradient: Gradient
{
GradientStop { position: 0.2; color: "transparent" }
GradientStop { position: 0.5; color: _labelBg.Kirigami.Theme.backgroundColor }
}
visible: false
}
MaskedBlur
FastBlur
{
id: blur
anchors.fill: parent
......@@ -166,10 +152,14 @@ Maui.ItemDelegate
_labelBg.width,
_labelBg.height)
}
maskSource: mask
radius: 16
samples: 24
radius: 50
Rectangle
{
anchors.fill: parent
color: _labelBg.Kirigami.Theme.backgroundColor
opacity: 0.4
}
layer.enabled: true
layer.effect: OpacityMask
......@@ -194,20 +184,7 @@ Maui.ItemDelegate
}
}
}
}
LinearGradient
{
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, parent.height)
opacity: control.hovered ? 1 : 0.9
gradient: Gradient
{
GradientStop { position: 0.1; color: "transparent" }
GradientStop { position: 1; color: _labelBg.Kirigami.Theme.backgroundColor }
}
}
}
}
ColumnLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment