Skip to content

Commit

Permalink
- let user deactivate window manager decorations on Linux only.
Browse files Browse the repository at this point in the history
  • Loading branch information
derreisende77 committed Sep 6, 2024
1 parent 52f1db9 commit b00074d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- **FEATURE:** Bei Änderungen der Senderauswahl wird nun jeweils einmalig per Warndialog auf die Notwendigkeit eines Neustarts der App hingewiesen.
- **FEATURE:** Im Tab Filme kann nun die Filmbeschreibung per Kontextmenü in die Zwischenablage kopiert werden.
- **FEATURE:** Im Tab Beschreibung und im FilmInfo-Dialog können jeweils selektierte Texte der Beschreibung per Kontextmenü in die Zwischenablage kopiert werden.
- **FEATURE(Linux):** Für exotische Window Manager können nun die FlatLaf-Dekorationen mittels `-dfd` oder `--disable-flatlaf-decorations` Parametern deaktiviert werden.

# **14.1.0**
- JDK 21 wird nun mitgeliefert. Behebt primär Darstellungsfehler von Java Apps unter Windows.
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/mediathek/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,11 @@ public static void main(final String... args) {
configureDnsPreferenceMode(parseResult);

if (SystemUtils.IS_OS_LINUX) {
// enable custom window decorations
JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );
if (!Config.isDisableFlatLafDecorations()) {
// enable custom window decorations
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
}
}

setupDockIcon();
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/mediathek/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class Config {
private static IPvPreferenceMode dnsIpPreferenceMode = IPvPreferenceMode.IPV4_ONLY;
@CommandLine.Option(names = {"-d", "--debug"}, hidden = true, description = "Debug-Modus aktivieren (FÜR ENTWICKLER)")
private static boolean debug; // Debugmodus
@CommandLine.Option(names = {"-dfd", "--disable-flatlaf-decorations"}, description = "Deaktiviert unter Linux Window Manager Dekorationen")
private static boolean disableFlatLafDecorations;
/**
* Limit the number of used CPUs on Windows.
*/
Expand Down Expand Up @@ -71,6 +73,10 @@ public class Config {
@CommandLine.Option(names = {"-dq", "--download-quit"}, description = "Automatisch downloaden, dann beenden")
private static boolean downloadAndQuit;

public static boolean isDisableFlatLafDecorations() {
return disableFlatLafDecorations;
}

public static IPvPreferenceMode getDnsIpPreferenceMode() {
return dnsIpPreferenceMode;
}
Expand Down

0 comments on commit b00074d

Please sign in to comment.