Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
pygobject
pygobject
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 241
    • Issues 241
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • pygobjectpygobject
  • Issues
  • #449

Closed
Open
Opened Jan 08, 2021 by GeoLang@George-Langroudi

GTK4 Gsk.Transform.translate cannot be created, but all other Transforms can

When creating a GskTransform, Gsk.Transform.translate() will appear to work, but does not create a translation.

If you create an Gsk.Transform and apply any other form of transformation they all work as expected, and when allocated apply to the widget as you would expect, but specifically translate and translate3D will not apply to the widget. If you print the list of transformations with Gsk.Transform.to_string(), all other transforms will appear except the translations.

For example, this is an implementation of the SWING_DOWN transformation in gtkrevealer.c:

transform = Gsk.Transform()
transform = transform.translate(Graphene.Point(width / 2, 0))
transform = transform.perspective(2 * (max(width, height)))
transform = transform.rotate_3d(delta * -1,
                                Graphene.vec3_x_axis())
transform = transform.translate(Graphene.Point((width / 2) * -1, 0))

The above works and can be allocated, but when printed with to_string, you get: perspective(1200) rotate3d(1, 0, 0, 356.528), and the translations will not apply.

transform = Gsk.Transform()
transform = transform.translate(Graphene.Point(width / 2, 0))

The above when printed with to_string prints none.

I also tried creating the transforms in the format transform = Gsk.Transform.translate(transform, Graphene.Point(width / 2, 0)), but the result is the same.

I tested this with all transformations in Gsk.Transform, and it appears that the only one this occurs with is Gsk.Transform.translate and Gsk.Transform.translate_3d.

Finally, I tested applying transforms in CSS with transform: translate(100px, 100px), and this works as intended.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/pygobject#449