Skip to content

Commit

Permalink
Backup
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Sep 27, 2023
1 parent a6e5463 commit c70214c
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 18 deletions.
252 changes: 250 additions & 2 deletions .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ configurations {

dependencies {
// implementation("com.github.weisj:darklaf-core:3.0.0")
implementation("com.formdev:flatlaf:2.4")
implementation("com.formdev:flatlaf-intellij-themes:2.4")
implementation("com.formdev:flatlaf-extras:2.4")
implementation("com.formdev:flatlaf-swingx:2.4")
implementation("com.formdev:flatlaf:3.0")
implementation("com.formdev:flatlaf-intellij-themes:3.0")
implementation("com.formdev:flatlaf-extras:3.0")
implementation("com.formdev:flatlaf-swingx:3.0")
implementation("commons-lang:commons-lang:2.6")
// implementation("com.formdev:flatlaf-jide-oss:2.4")
implementation("org.drjekyll:fontchooser:2.4")
implementation("com.google.code.gson:gson:2.9.0")
implementation("com.miglayout:miglayout-swing:11.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import com.formdev.flatlaf.*
import com.formdev.flatlaf.IntelliJTheme.ThemeLaf
import com.formdev.flatlaf.extras.FlatAnimatedLafChange
import com.formdev.flatlaf.extras.FlatSVGIcon
import com.formdev.flatlaf.themes.FlatMacDarkLaf
import com.formdev.flatlaf.themes.FlatMacLightLaf
import com.formdev.flatlaf.util.LoggingFacade
import com.formdev.flatlaf.util.StringUtils
import com.ultreon.notepadimproved.main.AppPrefs
Expand Down Expand Up @@ -159,6 +161,34 @@ class IJThemesPanel : JPanel() {
)
)

if (showLight) themes.add(
IJThemeInfo(
"FlatLaf macOS Light",
null,
true,
null,
null,
null,
null,
null,
FlatMacLightLaf::class.java.name
)
)

if (showDark) themes.add(
IJThemeInfo(
"FlatLaf macOS Dark",
null,
true,
null,
null,
null,
null,
null,
FlatMacDarkLaf::class.java.name
)
)

// add themes from directory
categories[themes.size] = "Current Directory"
themes.addAll(themesManager.moreThemes)
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/com/ultreon/notepadimproved/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ fun main() {
Thread.setDefaultUncaughtExceptionHandler { _, ex ->
crash(ex)
}

LanguageManager.registerDefaults()
LanguageManager.freeze()

Expand Down
26 changes: 16 additions & 10 deletions src/main/kotlin/com/ultreon/notepadimproved/main/AppPrefs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,27 @@ object AppPrefs {
val lafClassName = state[KEY_LAF, FlatLightLaf::class.java.name]
if (IntelliJTheme.ThemeLaf::class.java.name == lafClassName) {
val theme = state[KEY_LAF_THEME, ""]
if (theme.startsWith(RESOURCE_PREFIX)) IntelliJTheme.setup(
IJThemesPanel::class.java.getResourceAsStream(
IJThemesPanel.THEMES_PACKAGE + theme.substring(
RESOURCE_PREFIX.length
if (theme.startsWith(RESOURCE_PREFIX)) {
IntelliJTheme.setup(
IJThemesPanel::class.java.getResourceAsStream(
IJThemesPanel.THEMES_PACKAGE + theme.substring(
RESOURCE_PREFIX.length
)
)
)
) else if (theme.startsWith(FILE_PREFIX)) FlatLaf.setup(
IntelliJTheme.createLaf(
FileInputStream(
theme.substring(
FILE_PREFIX.length
} else if (theme.startsWith(FILE_PREFIX)) {
FlatLaf.setup(
IntelliJTheme.createLaf(
FileInputStream(
theme.substring(
FILE_PREFIX.length
)
)
)
)
) else FlatLightLaf.setup()
} else {
FlatLightLaf.setup()
}
if (theme.isNotEmpty()) UIManager.getLookAndFeelDefaults()[THEME_UI_KEY] = theme
} else if (FlatPropertiesLaf::class.java.name == lafClassName) {
val theme = state[KEY_LAF_THEME, ""]
Expand Down
6 changes: 6 additions & 0 deletions src/main/kotlin/com/ultreon/notepadimproved/main/Editor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ internal class Editor(file: File?, private val mainFrame: MainFrame) : JInternal
recentFilesMenu.removeAll()
recentFiles.forEach { recentFilesMenu.add(JMenuItem(action(it.name) { openFile(it) })) }
Settings.recentFiles = recentFiles.toList()

this.`hello world this is with spaces`()
}

fun `hello world this is with spaces`() {

}

private fun configureFont() {
Expand Down

0 comments on commit c70214c

Please sign in to comment.