Skip to content

Commit c570812

Browse files
committed
Presence Preview Show ApplicationName string when no image too
1 parent d7de203 commit c570812

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/main/java/de/depascaldc/discord/rpc/xgui/MainView.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,14 @@ private void repaintPreview() {
408408
lblPlayingAGame.setBounds(12, 12, 175, 15);
409409
presencePreviewPanel.add(lblPlayingAGame);
410410
if (!isEmptyString(guiContent.getLargeimagekey())) {
411-
JLabel lblApplicationname = new JLabel("ApplicationName");
411+
// paint with images
412+
413+
JLabel lblApplicationname = new JLabel("Application Name");
412414
lblApplicationname.setFont(new Font("Cantarell", Font.BOLD, 12));
413415
lblApplicationname.setForeground(Color.WHITE);
414416
lblApplicationname.setBounds(76, 30, 123, 15);
415417
presencePreviewPanel.add(lblApplicationname);
416-
// paint with images
418+
417419
JLabel label_3 = new JLabel(SwingUtil.newImageIcon("/appicon_68.png"));
418420
label_3.setBounds(12, 30, 70, 70);
419421
presencePreviewPanel.add(label_3);
@@ -487,6 +489,13 @@ public void actionPerformed(ActionEvent arg0) {
487489

488490
} else {
489491
// paint without images
492+
493+
JLabel lblApplicationname = new JLabel("Application Name");
494+
lblApplicationname.setFont(new Font("Cantarell", Font.BOLD, 12));
495+
lblApplicationname.setForeground(Color.WHITE);
496+
lblApplicationname.setBounds(12, 30, 175, 15);
497+
presencePreviewPanel.add(lblApplicationname);
498+
490499
if (!isEmptyString(guiContent.getDetails())) {
491500
JLabel lblThisAreTheDetails = new JLabel(guiContent.getDetails());
492501
lblThisAreTheDetails.setFont(new Font("Cantarell", Font.PLAIN, 10));

0 commit comments

Comments
 (0)