summaryrefslogtreecommitdiff
path: root/raveos-calamares/0005-raveos-qml-forditas.patch
blob: 286b4a1a8fdd57b789ffa1c2e035f84941075c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
--- a/src/calamares/CalamaresWindow.cpp
+++ b/src/calamares/CalamaresWindow.cpp
@@ -319,6 +319,7 @@
     w->setSource(
         QUrl( Calamares::searchQmlFile( Calamares::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) );
     setDimension( w, o, desiredWidth );
+    CALAMARES_RETRANSLATE_FOR( w, w->engine()->retranslate(); );
     return w;
 }
 
@@ -338,6 +339,7 @@
     w->setSource(
         QUrl( Calamares::searchQmlFile( Calamares::QmlSearch::Both, QStringLiteral( "calamares-navigation" ) ) ) );
     setDimension( w, o, desiredWidth );
+    CALAMARES_RETRANSLATE_FOR( w, w->engine()->retranslate(); );
     return w;
 }
 #else
--- a/src/libcalamaresui/ViewManager.cpp
+++ b/src/libcalamaresui/ViewManager.cpp
@@ -92,6 +92,16 @@
     connect( JobQueue::instance(), &JobQueue::finished, this, &ViewManager::next );
 
     CALAMARES_RETRANSLATE_SLOT( &ViewManager::updateButtonLabels );
+    CALAMARES_RETRANSLATE( QMetaObject::invokeMethod(
+                               this,
+                               [ this ]()
+                               {
+                                   if ( rowCount() > 0 )
+                                   {
+                                       emit dataChanged( index( 0 ), index( rowCount() - 1 ) );
+                                   }
+                               },
+                               Qt::QueuedConnection ); );
 
 #ifdef PRESERVE_FOR_TRANSLATION_PURPOSES
     tr( "&Yes" );
--- a/src/libcalamaresui/viewpages/QmlViewStep.cpp
+++ b/src/libcalamaresui/viewpages/QmlViewStep.cpp
@@ -17,6 +17,7 @@
 #include "utils/Logger.h"
 #include "utils/NamedEnum.h"
 #include "utils/Qml.h"
+#include "utils/Retranslator.h"
 #include "utils/Variant.h"
 #include "widgets/WaitingWidget.h"
 
@@ -87,6 +88,7 @@
     layout->addWidget( m_spinner );
 
     m_qmlEngine->addImportPath( Calamares::qmlModulesDir().absolutePath() );
+    CALAMARES_RETRANSLATE( m_qmlEngine->retranslate(); );
 
     // QML Loading starts when the configuration for the module is set.
 }
@@ -156,17 +158,8 @@
 QSize
 QmlViewStep::widgetMargins( Qt::Orientations panelSides )
 {
-    // If any panels around it, use the standard, but if all the
-    // panels are hidden, like on full-screen with subsumed navigation,
-    // then no margins.
-    if ( panelSides )
-    {
-        return ViewStep::widgetMargins( panelSides );
-    }
-    else
-    {
-        return QSize( 0, 0 );
-    }
+    Q_UNUSED( panelSides )
+    return QSize( 0, 0 );
 }
 
 void