-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(icons): Add dark/light mode icons
- Loading branch information
1 parent
7f14f59
commit d7e9252
Showing
14 changed files
with
105 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
package com.pestphp.pest | ||
|
||
import com.intellij.ide.ui.LafManager | ||
import com.intellij.ide.ui.laf.darcula.DarculaLookAndFeelInfo | ||
import com.intellij.openapi.util.IconLoader | ||
|
||
object PestIcons { | ||
val LOGO = IconLoader.getIcon("/logo.svg") | ||
val RUN_SINGLE_TEST = IconLoader.getIcon("/pest-run.svg") | ||
val CONFIG = IconLoader.getIcon("/pest-config.svg") | ||
val FILE = IconLoader.getIcon("/pest-file.svg") | ||
val RUN_SINGLE_TEST = IconLoader.getIcon("/run@${getThemeString()}.svg") | ||
val CONFIG = IconLoader.getIcon("/config@${getThemeString()}.svg") | ||
val FILE = IconLoader.getIcon("/file@${getThemeString()}.svg") | ||
|
||
private fun isDarkMode() = LafManager.getInstance().currentLookAndFeel == DarculaLookAndFeelInfo() | ||
private fun getThemeString(): String { | ||
if (isDarkMode()) { | ||
return "dark" | ||
} | ||
return "light" | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
src/main/kotlin/com/pestphp/pest/configuration/PestRunConfigurationSettings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package com.pestphp.pest.configuration | ||
|
||
import com.jetbrains.php.testFramework.run.PhpTestRunConfigurationSettings | ||
import com.jetbrains.php.testFramework.run.PhpTestRunnerSettings | ||
|
||
class PestRunConfigurationSettings : PhpTestRunConfigurationSettings() { | ||
private val pestRunnerSettings = PestRunnerSettings() | ||
override fun createDefault(): PhpTestRunnerSettings { | ||
return PestRunnerSettings() | ||
} | ||
} |
9 changes: 8 additions & 1 deletion
9
src/main/kotlin/com/pestphp/pest/configuration/PestRunnerSettings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
package com.pestphp.pest.configuration | ||
|
||
class PestRunnerSettings | ||
import com.intellij.util.xmlb.annotations.Attribute | ||
import com.jetbrains.php.phpunit.coverage.PhpUnitCoverageEngine.CoverageEngine | ||
import com.jetbrains.php.testFramework.run.PhpTestRunnerSettings | ||
|
||
class PestRunnerSettings : PhpTestRunnerSettings() { | ||
@Attribute("coverage_engine") | ||
var coverageEngine: CoverageEngine = CoverageEngine.XDEBUG | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.