support for GTK 3.98.3
This commit is contained in:
parent
e20c95abf5
commit
a725770ff0
15 changed files with 386 additions and 193 deletions
|
|
@ -53,7 +53,7 @@ type
|
|||
handlerID: uint64
|
||||
|
||||
proc newPosAdj: PosAdj =
|
||||
initAdjustment(result, 0, 0, 1, 1, 10, 1)
|
||||
newAdjustment(PosAdj, 0, 0, 1, 1, 10, 1)
|
||||
|
||||
type
|
||||
PDA_Data* = object
|
||||
|
|
@ -98,7 +98,7 @@ proc drawingAreaDrawCb(darea: DrawingArea; cr: Context; this: PDA): bool =
|
|||
if this.selecting:
|
||||
cr.rectangle(this.lastButtonDownPosX, this.lastButtonDownPosY,
|
||||
this.zoomRectX1 - this.lastButtonDownPosX, this.zoomRectY1 - this.lastButtonDownPosY)
|
||||
cr.setSource(0, 0, 1, 0.5) # SELECT_RECT_COL) # 0, 0, 1, 0.5
|
||||
cr.setSource(SelectRectCol) # SELECT_RECT_COL) # 0, 0, 1, 0.5
|
||||
cr.fillPreserve
|
||||
cr.setSource(0, 0, 0)
|
||||
cr.setLineWidth(2)
|
||||
|
|
@ -227,7 +227,7 @@ proc onAdjustmentEvent(this: PosAdj; pda: PDA) =
|
|||
pda.darea.queueDrawArea(0, 0, pda.darea.allocatedWidth, pda.darea.allocatedHeight)
|
||||
|
||||
proc newPDA: PDA =
|
||||
initGrid(result)
|
||||
result = newGrid(PDA)
|
||||
let da = newDrawingArea()
|
||||
result.darea = da
|
||||
da.setHExpand
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue