GridView {
id: grid
anchors {
- topMargin: 60; bottomMargin: 0
+ topMargin: 60; bottomMargin: 0
leftMargin: 60; rightMargin: 60
fill: parent
}
property int index: grid.indexAt(loc.mouseX, loc.mouseY)
x: 62
y: 264
+ anchors.rightMargin: 0
+ anchors.bottomMargin: 0
+ anchors.leftMargin: 0
+ anchors.topMargin: 0
onPressAndHold: currentId = applicationModel.id(newIndex = index)
onReleased: {
- if(loc.index < 0) {
- return
- }
if (currentId === '') {
pid = launcher.launch(applicationModel.id(loc.index))
if (1 < pid) {
- homescreenHandler.tapShortcut(applicationModel.name(loc.index))
}
else {
console.warn("app cannot be launched!")
} else {
currentId = ''
}
+ homescreenHandler.tapShortcut(applicationModel.name(loc.index))
}
onPositionChanged: {
if (loc.currentId === '') return
<file>settings_inactive.svg</file>
<file>video_active.svg</file>
<file>video_inactive.svg</file>
- <file>webbrowser_active.svg</file>
- <file>webbrowser_inactive.svg</file>
+ <file>browser_active.svg</file>
+ <file>browser_inactive.svg</file>
<file>blank_active.svg</file>
<file>blank_inactive.svg</file>
<file>plus_active.svg</file>
auto const id = jso["id"].toString();
auto const icon = get_icon_name(jso);
- if ( name != "launcher" &&
- name != "homescreen-2017" &&
- name != "homescreen" &&
- name != "OnScreenApp") {
+ // Hide HomeScreen icon itself
+ if (name != "launcher" &&
+ name != "homescreen-2017" &&
+ name != "homescreen" &&
+ !name.contains("OnScreen", Qt::CaseInsensitive)) {
this->data.append(AppInfo(icon, name, id));
}
homescreenHandler->init(port, token.toStdString().c_str());
homescreenHandler->set_event_handler(QLibHomeScreen::Event_TapShortcut, [layoutHandler, myname](json_object *object){
- json_object *appnameJ = nullptr;
- if(json_object_object_get_ex(object, "application_name", &appnameJ))
- {
- const char *appname = json_object_get_string(appnameJ);
- if(myname == appname)
- {
- qDebug("Surface %s got tapShortcut\n", appname);
- layoutHandler->activateSurface(myname);
- }
- }
+ qDebug("Surface launcher got tapShortcut. \n");
+ layoutHandler->activateSurface(myname);
});
QUrl bindingAddress;