Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Vivy
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
Vivy
Validations
fba769bf
Vérifiée
Valider
fba769bf
rédigé
Il y a 4 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
UI: Add used licences in about window
parent
5305ec66
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
1 requête de fusion
!10
UI improvements
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/UI/AboutWindow.cc
+35
-1
35 ajouts, 1 suppression
src/UI/AboutWindow.cc
utils/rsc/licence/OFL-1.1
+1
-1
1 ajout, 1 suppression
utils/rsc/licence/OFL-1.1
avec
36 ajouts
et
2 suppressions
src/UI/AboutWindow.cc
+
35
−
1
Voir le fichier @
fba769bf
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include
<QEvent>
#include
<QEvent>
#include
<QMouseEvent>
#include
<QMouseEvent>
#include
<QApplication>
#include
<QApplication>
#include
<QTextEdit>
using
namespace
Vivy
;
using
namespace
Vivy
;
...
@@ -50,6 +51,29 @@ public:
...
@@ -50,6 +51,29 @@ public:
}
}
};
};
// Simple QLabel for licences
class
LicenceLabel
:
public
QTextEdit
{
public:
explicit
LicenceLabel
(
QWidget
*
parent
,
const
QString
&
url
)
:
QTextEdit
(
parent
)
{
QFile
content
(
url
);
if
(
!
content
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
throw
std
::
runtime_error
(
"Failed to open file that should be accessible"
);
setText
(
content
.
readAll
());
setTextInteractionFlags
(
Qt
::
NoTextInteraction
);
setAlignment
(
Qt
::
AlignJustify
|
Qt
::
AlignTop
);
setAcceptRichText
(
true
);
setReadOnly
(
true
);
setAutoFormatting
(
QTextEdit
::
AutoAll
);
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarAsNeeded
);
setFont
(
vivyApp
->
getApplicationFont
(
VivyApplication
::
Font
::
Monospace
));
setFrameStyle
(
QFrame
::
NoFrame
);
}
};
// Construct the AboutWindow
// Construct the AboutWindow
AboutWindow
::
AboutWindow
(
QWidget
*
parent
)
noexcept
AboutWindow
::
AboutWindow
(
QWidget
*
parent
)
noexcept
:
Window
(
QIcon
(
":icons/vivy.png"
),
"Vivy - About"
,
parent
)
:
Window
(
QIcon
(
":icons/vivy.png"
),
"Vivy - About"
,
parent
)
...
@@ -64,8 +88,18 @@ AboutWindow::AboutWindow(QWidget *parent) noexcept
...
@@ -64,8 +88,18 @@ AboutWindow::AboutWindow(QWidget *parent) noexcept
panels
->
addTab
(
new
SimpleLabel
(
panels
,
aboutContent
),
"About"
);
panels
->
addTab
(
new
SimpleLabel
(
panels
,
aboutContent
),
"About"
);
panels
->
addTab
(
new
SimpleLabel
(
panels
,
libContent
),
"Libraries"
);
panels
->
addTab
(
new
SimpleLabel
(
panels
,
libContent
),
"Libraries"
);
QTabWidget
*
licences
=
new
QTabWidget
(
panels
);
licences
->
setTabPosition
(
QTabWidget
::
TabPosition
::
West
);
licences
->
addTab
(
new
LicenceLabel
(
licences
,
":licence/MIT"
),
"MIT"
);
licences
->
addTab
(
new
LicenceLabel
(
licences
,
":licence/LGPL-V2.0"
),
"LGPL-V2.0"
);
licences
->
addTab
(
new
LicenceLabel
(
licences
,
":licence/LGPL-V2.1"
),
"LGPL-V2.1"
);
licences
->
addTab
(
new
LicenceLabel
(
licences
,
":licence/LGPL-V3"
),
"LGPL-V3"
);
licences
->
addTab
(
new
LicenceLabel
(
licences
,
":licence/OFL-1.1"
),
"OFL-1.1"
);
panels
->
addTab
(
licences
,
"Licences"
);
setCentralWidget
(
panels
);
setCentralWidget
(
panels
);
resize
(
300
,
400
);
setMinimumWidth
(
800
);
setMinimumHeight
(
600
);
}
}
void
void
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
utils/rsc/licence/OFL-1.1
+
1
−
1
Voir le fichier @
fba769bf
Copyright (c)
2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
Copyright (c)
year, authors
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
This license is copied below, and is also available with a FAQ at:
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter