@@ -4,7 +4,7 @@ import java.awt.event.{ MouseAdapter, MouseEvent, MouseWheelEvent }
44import java .nio .{ FloatBuffer , IntBuffer }
55
66import com .jogamp .opengl .{ GL , GL2 , GL2ES1 , GLAutoDrawable , GLEventListener }
7- import com .jogamp .opengl .awt .GLCanvas
7+ import com .jogamp .opengl .awt .GLJPanel
88import com .jogamp .opengl .fixedfunc .{ GLLightingFunc , GLMatrixFunc }
99import com .jogamp .opengl .glu .GLU
1010
@@ -19,12 +19,6 @@ import scala.collection.mutable.Map
1919import view25d .view .gl .NetLogoGLU
2020
2121abstract class MouseableGLWindow (viewer : VarviewWindow ) extends MouseAdapter with GLEventListener {
22- private val uiScale = if (System .getProperty(" os.name" ).toLowerCase.contains(" linux" )) {
23- Utils .getUIScale
24- } else {
25- 1
26- }
27-
2822 // initial values are overwritten immediately - this is the correct initial value for the default model
2923 val observer = new Observer (0 , 0 , 49.5 )
3024
@@ -52,14 +46,14 @@ abstract class MouseableGLWindow(viewer: VarviewWindow) extends MouseAdapter wit
5246 def getObserverDistance : Double =
5347 observer.dist
5448
55- protected var canvas : GLCanvas = null
49+ protected var canvas : GLJPanel = null
5650
5751 protected var oldx = 0
5852 protected var oldy = 0
5953
6054 var dragging = false
6155
62- def setCanvas (glCanvas : GLCanvas ): Unit = {
56+ def setCanvas (glCanvas : GLJPanel ): Unit = {
6357 canvas = glCanvas
6458 }
6559
@@ -321,8 +315,8 @@ abstract class MouseableGLWindow(viewer: VarviewWindow) extends MouseAdapter wit
321315
322316 // required by Interface GLEventListener
323317 override def reshape (drawable : GLAutoDrawable , x : Int , y : Int , width : Int , height : Int ): Unit = {
324- viewer.viewWidth = ( width * uiScale) .toInt
325- viewer.viewHeight = ( height * uiScale) .toInt
318+ viewer.viewWidth = width.toInt
319+ viewer.viewHeight = height.toInt
326320
327321 mainViewport(drawable.getGL.asInstanceOf [GL2 ], glu)
328322 }
0 commit comments