Skip to content

DynamicNotebook: Padding and border around Gtk.EventBox #523

@felix-andreas

Description

@felix-andreas

Conversation from elementary/granite#295:


@andreasfelix Definitely better than before! It still happens when I double-wheelclick on the border between two tabs, though. Do you think this is can/should be fixed within the same PR?

Originally posted by @jlnr in elementary/granite#295 (comment)


Unfortunately I think this is a different Issue. I have highlighted the size of the GranitsWidgetsTab and logged the enter and leave events:

Border_event

As one can see, the size of the GranitsWidgetsTab is slightly smaller than its visual size. This can also be seen at the event log: The signal get emitted when entering/leaving the blue highlighted area. When clicking on a Tab outside of this are, the signal gets directly passed to DynamicNotebook which leads to the restoring of the last closed tab.

I think this is related to the padding and border in the style sheet:

notebook tab {
background-image: none;
background-color: transparent;
border-image:
linear-gradient(
to bottom,
transparent,
alpha (
#000,
0.2
)
) 0 1 0 0;
border-radius: 0;
border-style: solid;
border-width: 0 1px;
color: shade (@text_color, 1.12);
margin-right: -1px;
padding: 3px;
}

Maybe it could be solved by changing notebook tab to notebook tab widgets grid, so the padding is within the Gtk.EventBox.

Originally posted by @andreasfelix in elementary/granite#295 (comment)


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions