|
@@ -200,7 +200,7 @@ public class TopicBar extends JComponent implements ActionListener,
|
200
|
200
|
controller.getDomain(), "showfulltopic", this);
|
201
|
201
|
IdentityManager.getGlobalConfig().addChangeListener(
|
202
|
202
|
controller.getDomain(), "hideEmptyTopicBar", this);
|
203
|
|
-
|
|
203
|
+
|
204
|
204
|
topicText.setFocusable(false);
|
205
|
205
|
topicText.setEditable(false);
|
206
|
206
|
topicCancel.setVisible(false);
|
|
@@ -258,6 +258,7 @@ public class TopicBar extends JComponent implements ActionListener,
|
258
|
258
|
if (channel.getCurrentTopic() != null) {
|
259
|
259
|
topicText.setText(channel.getCurrentTopic().getTopic());
|
260
|
260
|
}
|
|
261
|
+ applyAttributes();
|
261
|
262
|
topicText.setCaretPosition(0);
|
262
|
263
|
topicText.setFocusable(true);
|
263
|
264
|
topicText.setEditable(true);
|
|
@@ -306,6 +307,12 @@ public class TopicBar extends JComponent implements ActionListener,
|
306
|
307
|
StyleConstants.setItalic(as, false);
|
307
|
308
|
}
|
308
|
309
|
|
|
310
|
+ private void applyAttributes() {
|
|
311
|
+ setAttributes();
|
|
312
|
+ ((DefaultStyledDocument) topicText.getDocument()).setCharacterAttributes(
|
|
313
|
+ 0, Integer.MAX_VALUE, as, true);
|
|
314
|
+ }
|
|
315
|
+
|
309
|
316
|
/**
|
310
|
317
|
* Sets the caret position in this topic bar.
|
311
|
318
|
*
|
|
@@ -508,10 +515,7 @@ public class TopicBar extends JComponent implements ActionListener,
|
508
|
515
|
|
509
|
516
|
@Override
|
510
|
517
|
public void run() {
|
511
|
|
- setAttributes();
|
512
|
|
- ((DefaultStyledDocument) topicText.getDocument()).
|
513
|
|
- setCharacterAttributes(0, Integer.MAX_VALUE, as,
|
514
|
|
- true);
|
|
518
|
+ applyAttributes();
|
515
|
519
|
}
|
516
|
520
|
});
|
517
|
521
|
}
|