Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changing the theme through short cut menu. #207

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

MarcMcIntosh
Copy link
Collaborator

@MarcMcIntosh MarcMcIntosh commented Jan 7, 2025

Fixes #204

To recreate the issues change the theme using the short cut menu ^` select theme and click on a theme.

Ticket: https://refact.fibery.io/Software_Development/UI-chat-js-133#Task/JB-theme-changes-544

@@ -228,8 +226,16 @@ class SharedChatPane(val project: Project) : JPanel(), Disposable {
val ef = EditorFactory.getInstance()
ef.eventMulticaster.addSelectionListener(selectionListener, this)

ApplicationManager.getApplication().messageBus.connect(this).subscribe(LafManagerListener.TOPIC, uiChangeListener)

// ApplicationManager.getApplication().messageBus.connect(this).subscribe(UISettingsListener.TOPIC,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comments

@@ -299,7 +302,7 @@ class ChatWebView(val editor: Editor, val messageHandler: (event: Events.FromCha
fun postMessage(message: Events.ToChat<*>?) {
if (message != null) {
val json = Events.stringify(message)
// println("post message json: $json")
println("post message json: $json")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use logger instead println

UISettingsListener {
ApplicationManager.getApplication().invokeLater {
println("Ui Update")
// this.browser.setStyle()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comments

@@ -59,6 +59,7 @@ class ChatWebView(val editor: Editor, val messageHandler: (event: Events.FromCha

fun setStyle() {
val isDarkMode = LafManager.getInstance().currentUIThemeLookAndFeel.isDark
// println("isDark: $isDarkMode")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Color Selection for Text and Background in Themes
2 participants