Skip to content

Commit f4aae65

Browse files
committed
fix: 调整tooltip显示延迟和颜色逻辑
1 parent 1483080 commit f4aae65

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/xhf/leetcode/plugin/io/http/LeetcodeClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,6 @@ public UserCalendar queryUserCalendar() {
869869
// build graphql req
870870
GraphqlReqBody body = new GraphqlReqBody(LeetcodeApiUtils.USER_PROFILE_CALENDAR_QUERY);
871871
body.addVariable("userSlug", queryUserStatus().getUserSlug());
872-
body.addVariable("year", LocalDate.now().getYear());
873872

874873
HttpRequest httpRequest = new HttpRequest.RequestBuilder(url)
875874
.setBody(body.toJsonStr())

src/main/java/com/xhf/leetcode/plugin/personal/ContributionGraphPanel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class CalendarContributionPanel(data: Map<Long, Int>) : JPanel() {
3333

3434
init {
3535
toolTipText = ""
36+
ToolTipManager.sharedInstance().initialDelay = 200
3637

3738
// 1. 计算起止范围
3839
val dates = data.keys.map { Date(it * 1000) }.sorted()
@@ -88,7 +89,7 @@ class CalendarContributionPanel(data: Map<Long, Int>) : JPanel() {
8889
}
8990

9091
private fun getColor(count: Int): Color = when {
91-
count == 0 -> JBColor.GRAY
92+
count == 0 -> JBColor(Color(210, 208, 208), Color(187, 186, 186))
9293
count < 2 -> Color(200, 255, 150)
9394
count < 6 -> Color(140, 210, 100)
9495
count < 11 -> Color(88, 163, 89)

0 commit comments

Comments
 (0)