mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[libcalamaresui] Set activatedInCalamares special property
- when the QML is activated, if the slideshow has this property, set it to true. This enables the keyboard shortcuts.
This commit is contained in:
parent
7df6ed31e9
commit
1e3e53d30a
1 changed files with 11 additions and 0 deletions
|
@ -191,6 +191,17 @@ activateSlideShow( QQuickItem* slideshow, QQuickWidget* widget)
|
||||||
{
|
{
|
||||||
// API version 1 assumes onCompleted is the trigger
|
// API version 1 assumes onCompleted is the trigger
|
||||||
widget->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ) );
|
widget->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ) );
|
||||||
|
slideshow = widget->rootObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( slideshow )
|
||||||
|
{
|
||||||
|
static const char propertyName[] = "activatedInCalamares";
|
||||||
|
auto active = slideshow->property( propertyName );
|
||||||
|
if ( active.isValid() && ( active.type() == QVariant::Bool ) && !active.toBool() )
|
||||||
|
{
|
||||||
|
slideshow->setProperty( propertyName, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue