mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-16 22:01:11 +00:00
stream frame is now built. frames are now created centered. now show appname on osx instead of com.limelight.limelight
This commit is contained in:
@@ -3,6 +3,7 @@ package com.limelight.gui;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
@@ -35,8 +36,9 @@ public class MainFrame {
|
||||
}
|
||||
|
||||
public void build() {
|
||||
limeFrame = new JFrame("Limelight V" + Limelight.VERSION);
|
||||
limeFrame = new JFrame("Limelight");
|
||||
limeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
Container mainPane = limeFrame.getContentPane();
|
||||
|
||||
mainPane.setLayout(new BorderLayout());
|
||||
@@ -86,8 +88,10 @@ public class MainFrame {
|
||||
|
||||
centerPane.add(contentBox);
|
||||
mainPane.add(centerPane, "Center");
|
||||
|
||||
|
||||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
limeFrame.setSize(300, 175);
|
||||
limeFrame.setLocation(dim.width/2-limeFrame.getSize().width/2, dim.height/2-limeFrame.getSize().height/2);
|
||||
limeFrame.setResizable(false);
|
||||
limeFrame.setVisible(true);
|
||||
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package com.limelight.gui;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public class StreamFrame extends JFrame {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public void build() {
|
||||
|
||||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
this.setSize(1280,720);
|
||||
//This might break if the screen res is too small...not sure though
|
||||
this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);
|
||||
this.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user