Skip to content

Commit

Permalink
Merge pull request #437 from blurfl/fix-OSX-notification-size
Browse files Browse the repository at this point in the history
Fix osx notification size
  • Loading branch information
BarbourSmith authored Oct 31, 2017
2 parents cf1a383 + 22a947a commit fc4e9f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion UIElements/diagnosticsMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from UIElements.measureMachinePopup import MeasureMachinePopup
from UIElements.calibrateLengthsPopup import CalibrateLengthsPopup
from Simulation.simulationCanvas import SimulationCanvas
import sys

class Diagnostics(FloatLayout, MakesmithInitFuncs):

Expand All @@ -29,7 +30,10 @@ def about(self):
'along with the Maslow Control Software. If not, see <http://www.gnu.org/licenses/>.'

content = ScrollableTextPopup(cancel = self.dismiss_popup, text = popupText, markup = True)
self._popup = Popup(title="About GroundControl", content=content, size=(520,400), size_hint=(None, None))
if sys.platform.startswith('darwin'):
self._popup = Popup(title="About GroundControl", content=content, size=(520,400), size_hint=(.6, .6))
else:
self._popup = Popup(title="About GroundControl", content=content, size=(520,400), size_hint=(None, None))
self._popup.open()

def dismiss_popup(self):
Expand Down
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from kivy.uix.popup import Popup
import math
import global_variables
import sys


'''
Expand Down Expand Up @@ -559,7 +560,11 @@ def runPeriodically(self, *args):
except:
pass #there wasn't a popup to close
content = NotificationPopup(continueOn = self.dismiss_popup_continue, text = message[9:])
self._popup = Popup(title="Notification: ", content=content,
if sys.platform.startswith('darwin'):
self._popup = Popup(title="Notification: ", content=content,
auto_dismiss=False, size=(360,240), size_hint=(.3, .3))
else:
self._popup = Popup(title="Notification: ", content=content,
auto_dismiss=False, size=(360,240), size_hint=(None, None))
self._popup.open()
if global_variables._keyboard:
Expand Down

0 comments on commit fc4e9f3

Please sign in to comment.