Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 84d50c4caf48
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b59283f85eeb
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 29, 2016

  1. Copy the full SHA
    b6232ae View commit details
  2. Copy the full SHA
    b59283f View commit details
Showing with 15 additions and 10 deletions.
  1. +11 −9 artiq/frontend/artiq_gui.py
  2. +4 −1 artiq/gui/applets.py
20 changes: 11 additions & 9 deletions artiq/frontend/artiq_gui.py
Original file line number Diff line number Diff line change
@@ -37,9 +37,14 @@ def get_argparser():
class MainWindow(QtWidgets.QMainWindow):
def __init__(self, server):
QtWidgets.QMainWindow.__init__(self)

icon = QtGui.QIcon(os.path.join(artiq_dir, "gui", "logo.svg"))
self.setWindowIcon(icon)
self.setWindowTitle("ARTIQ - {}".format(server))

qfm = QtGui.QFontMetrics(self.font())
self.resize(140*qfm.averageCharWidth(), 38*qfm.lineSpacing())

self.exit_request = asyncio.Event()

def closeEvent(self, *args):
@@ -149,17 +154,14 @@ def main():
smgr.register(logmgr)

# lay out docks
right_docks = [d_explorer, d_shortcuts]
if os.name != "nt":
main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, d_ttl_dds.dds_dock)
main_window.tabifyDockWidget(d_ttl_dds.dds_dock, d_ttl_dds.ttl_dock)
main_window.tabifyDockWidget(d_ttl_dds.ttl_dock, d_applets)
main_window.tabifyDockWidget(d_applets, d_datasets)
else:
main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, d_applets)
main_window.tabifyDockWidget(d_applets, d_datasets)
main_window.tabifyDockWidget(d_datasets, d_shortcuts)
right_docks += [d_ttl_dds.ttl_dock, d_ttl_dds.dds_dock]
right_docks += [d_datasets, d_applets]
main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, right_docks[0])
for d1, d2 in zip(right_docks, right_docks[1:]):
main_window.tabifyDockWidget(d1, d2)
main_window.addDockWidget(QtCore.Qt.BottomDockWidgetArea, d_schedule)
main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, d_explorer)

# load/initialize state
if os.name == "nt":
5 changes: 4 additions & 1 deletion artiq/gui/applets.py
Original file line number Diff line number Diff line change
@@ -89,7 +89,10 @@ class _AppletDock(QDockWidgetCloseDetect):
def __init__(self, datasets_sub, uid, name, command):
QDockWidgetCloseDetect.__init__(self, "Applet: " + name)
self.setObjectName("applet" + str(uid))
self.setMinimumSize(QtCore.QSize(100, 100))

qfm = QtGui.QFontMetrics(self.font())
self.setMinimumSize(20*qfm.averageCharWidth(), 5*qfm.lineSpacing())
self.resize(40*qfm.averageCharWidth(), 10*qfm.lineSpacing())

self.datasets_sub = datasets_sub
self.applet_name = name