Skip to content

Commit

Permalink
feat(icons): Add dark/light mode icons
Browse files Browse the repository at this point in the history
  • Loading branch information
olivernybroe committed Aug 12, 2020
1 parent 7f14f59 commit d7e9252
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 66 deletions.
19 changes: 1 addition & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,12 @@

## [Unreleased]
### Added
- Added dark/light mode icons ([#45](https://github.com/pestphp/pest-intellij/pull/45))

### Changed

### Deprecated

### Removed

### Fixed

### Security
## [0.3.1]
### Added

### Changed
- Change the name of the plugin

### Deprecated

### Removed

### Fixed

### Security
## [0.3.0]
### Added
- Basic autocompletion for `$this` for PhpUnit TestCase base class ([#11](https://github.com/pestphp/pest-intellij/pull/11))
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.pestphp
pluginName = PEST PHP
pluginVersion = 0.3.1
pluginVersion = 0.3.2
pluginSinceBuild = 201
pluginUntilBuild = null

Expand Down
16 changes: 13 additions & 3 deletions src/main/kotlin/com/pestphp/pest/PestIcons.kt
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"
}
}
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()
}
}
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
}
15 changes: 15 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions src/main/resources/pest-config.svg

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/pest-file.svg

This file was deleted.

16 changes: 0 additions & 16 deletions src/main/resources/pest-run.svg

This file was deleted.

18 changes: 18 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/main/resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7e9252

Please sign in to comment.