Skip to content

Commit

Permalink
Upgrade logo
Browse files Browse the repository at this point in the history
  • Loading branch information
IceMimosa committed Oct 10, 2023
1 parent 0d742a2 commit 52eb974
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sbt Dependency Analyzer for IntelliJ IDEA
---------

<img src="./logo.png" width = "200" height = "100" alt="logo" align="right" />
<img src="./logo.svg" width = "250" height = "150" alt="logo" align="right" />

[![Build](https://github.com/bitlap/intellij-sbt-dependency-analyzer/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/intellij-sbt-dependency-analyzer/actions/workflows/ScalaCI.yml)
[![Version](https://img.shields.io/jetbrains/plugin/v/22427-sbt-dependency-analyzer?label=Version)](https://plugins.jetbrains.com/plugin/22427-sbt-dependency-analyzer/versions)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sbt Dependency Analyzer for IntelliJ IDEA
---------

<img src="./logo.png" width = "200" height = "100" alt="logo" align="right" />
<img src="./logo.svg" width = "250" height = "150" alt="logo" align="right" />

[![Build](https://github.com/bitlap/intellij-sbt-dependency-analyzer/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/intellij-sbt-dependency-analyzer/actions/workflows/ScalaCI.yml)
[![Version](https://img.shields.io/jetbrains/plugin/v/22427-sbt-dependency-analyzer?label=Version)](https://plugins.jetbrains.com/plugin/22427-sbt-dependency-analyzer/versions)
Expand Down
Binary file removed logo.png
Binary file not shown.
1 change: 1 addition & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import com.intellij.openapi.observable.util.whenMousePressed
import com.intellij.ui.ListUtil
import com.intellij.ui.components.DropDownLink
import com.intellij.ui.components.JBList
import com.intellij.util.ui.EmptyIcon
import com.intellij.util.ui.JBUI

@Suppress("DEPRECATION")
Expand All @@ -24,10 +25,17 @@ internal class ExternalProjectSelector(
externalProjects: List<DependencyAnalyzerProject>,
private val iconProvider: ExternalSystemIconProvider
) : JPanel() {

private val projectIcon = if (iconProvider.projectIcon is EmptyIcon) {
PROJECT_ICON
} else {
iconProvider.projectIcon
}

init {
val dropDownLink = ExternalProjectDropDownLink(property, externalProjects)
.apply { border = JBUI.Borders.empty(BORDER, ICON_TEXT_GAP / 2, BORDER, BORDER) }
val label = JLabel(iconProvider.projectIcon)
val label = JLabel(projectIcon)
.apply { border = JBUI.Borders.empty(BORDER, BORDER, BORDER, ICON_TEXT_GAP / 2) }
.apply { labelFor = dropDownLink }

Expand Down Expand Up @@ -70,7 +78,7 @@ internal class ExternalProjectSelector(
cellHasFocus: Boolean
): Component {
return JLabel()
.apply { if (value != null) icon = iconProvider.projectIcon }
.apply { if (value != null) icon = projectIcon }
.apply { if (value != null) text = value.title }
.apply { border = emptyListCellBorder(list, index) }
.apply { iconTextGap = JBUI.scale(ICON_TEXT_GAP) }
Expand All @@ -93,7 +101,7 @@ internal class ExternalProjectSelector(
super.popupPoint()
.apply { x += insets.left }
.apply { x -= JBUI.scale(BORDER) }
.apply { x -= iconProvider.projectIcon.iconWidth }
.apply { x -= projectIcon.iconWidth }
.apply { x -= JBUI.scale(ICON_TEXT_GAP) }

override fun itemToString(item: DependencyAnalyzerProject?): String = when (item) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package bitlap.sbt.analyzer.jbexternal.util

import bitlap.sbt.analyzer.jbexternal.DependencyAnalyzerManager
import java.awt.BorderLayout
import javax.swing.JComponent
import javax.swing.JLabel
import javax.swing.JList
import javax.swing.JPanel
import javax.swing.JTree
import javax.swing.Icon
import javax.swing.border.Border

import com.intellij.icons.AllIcons
Expand All @@ -26,6 +28,7 @@ import com.intellij.openapi.observable.util.bind
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.ui.SimpleToolWindowPanel
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.util.IconLoader
import com.intellij.ui.CardLayoutPanel
import com.intellij.ui.OnePixelSplitter
import com.intellij.ui.components.JBLoadingPanel
Expand All @@ -34,6 +37,7 @@ import com.intellij.util.ui.components.BorderLayoutPanel
import com.intellij.util.ui.tree.TreeUtil


internal val PROJECT_ICON: Icon = IconLoader.getIcon("/icons/sbt_dependency_analyzer.svg", DependencyAnalyzerManager::class.java)
internal const val BORDER = 6
internal const val INDENT = 16
internal const val ICON_TEXT_GAP = 4
Expand Down
Binary file removed src/main/resources/META-INF/pluginIcon.png
Binary file not shown.
18 changes: 1 addition & 17 deletions src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/icons/sbt_dependency_analyzer.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/resources/icons/sbt_dependency_analyzer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 52eb974

Please sign in to comment.