forked from External/mage
* Some fixes to font size change of chat panels.
This commit is contained in:
parent
6b20f7733a
commit
77a8e3e7a9
5 changed files with 35 additions and 20 deletions
|
|
@ -23,7 +23,7 @@
|
|||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jScrollPaneTxt" pref="190" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPaneTxt" pref="180" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="txtMessage" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
|
@ -67,14 +67,14 @@
|
|||
<Component class="javax.swing.JTextField" name="txtMessage">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[5000, 60]"/>
|
||||
<Dimension value="[5000, 70]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[6, 60]"/>
|
||||
<Dimension value="[6, 70]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[6, 60]"/>
|
||||
<Dimension value="[6, 70]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
|
|
|||
|
|
@ -310,10 +310,10 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
txtConversation.setOpaque(false);
|
||||
jScrollPaneTxt.setViewportView(txtConversation);
|
||||
|
||||
txtMessage.setMaximumSize(new java.awt.Dimension(5000, 60));
|
||||
txtMessage.setMinimumSize(new java.awt.Dimension(6, 60));
|
||||
txtMessage.setMaximumSize(new java.awt.Dimension(5000, 70));
|
||||
txtMessage.setMinimumSize(new java.awt.Dimension(6, 70));
|
||||
txtMessage.setName(""); // NOI18N
|
||||
txtMessage.setPreferredSize(new java.awt.Dimension(6, 60));
|
||||
txtMessage.setPreferredSize(new java.awt.Dimension(6, 70));
|
||||
txtMessage.addKeyListener(new java.awt.event.KeyAdapter() {
|
||||
public void keyTyped(java.awt.event.KeyEvent evt) {
|
||||
txtMessageKeyTyped(evt);
|
||||
|
|
@ -330,7 +330,7 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jScrollPaneTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPaneTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(txtMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@
|
|||
*/
|
||||
package mage.client.chat;
|
||||
|
||||
import java.awt.Font;
|
||||
import static mage.client.chat.ChatPanelBasic.TIMESTAMP_COLOR;
|
||||
import mage.client.components.ColorPane;
|
||||
import mage.client.util.FontSizeHelper;
|
||||
import mage.view.ChatMessage;
|
||||
import org.mage.card.arcane.ManaSymbols;
|
||||
|
||||
|
|
@ -103,6 +105,15 @@ public class ChatPanelSeparated extends ChatPanelBasic {
|
|||
|
||||
public void setSystemMessagesPane(ColorPane systemMessagesPane) {
|
||||
this.systemMessagesPane = systemMessagesPane;
|
||||
changeGUISize(FontSizeHelper.getChatFont());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeGUISize(Font font) {
|
||||
if (systemMessagesPane != null) {
|
||||
systemMessagesPane.setFont(font);
|
||||
}
|
||||
super.changeGUISize(font);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue