Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix osx notification size #437

Merged
merged 2 commits into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions UIElements/gcodeCanvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def reloadGcode(self, *args):
rawfilters = filterfile.read()
filtersparsed = re.sub(r'\(([^)]*)\)','',rawfilters) #removes mach3 style gcode comments
filtersparsed = re.sub(r';([^\n]*)\n','',filtersparsed) #removes standard ; initiated gcode comments
filtersparsed = re.sub(r' +',' ',filtersparsed) #condense space runs

if self.data.config.getint('Advanced Settings','truncate'):
digits = self.data.config.get('Advanced Settings','digits')
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