sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
801 stars 36 forks source link

Remove space between tab and top of ui window on linux #3904

Open heimer16 opened 3 years ago

heimer16 commented 3 years ago

Problem description

There seems to be a small gap between the top of the UI when in full-screen mode on linux that when clicking at the very top edge of the screen does not register/activate the tab. I've compared with the same settings in windows, where it does work.

The process on both:

  1. open vanilla install
  2. change file_tab_style to square
  3. hide menu
  4. F+11 to enter full screen mode.

result on windows: clicking at the very top activates the tab

https://user-images.githubusercontent.com/890855/107860891-a4953380-6e07-11eb-9815-60a506d4f4e8.mp4

result on linux: clicking at the very top hits some sort of gap in the ui and does not activate tab

https://user-images.githubusercontent.com/890855/107860904-b70f6d00-6e07-11eb-8752-4ec4fea339a1.mp4

OdatNurd commented 3 years ago

You want to set this setting to square:

    // Controls the style of file tabs for the Default, Default Dark, and
    // Adaptive themes.
    // Options: "rounded", "square"
    //   The value "angled" provides the tab style from Sublime Text 3, but is
    //   only compatible with the Default and Adaptive themes, and will not
    //   support new features like inactive pane dimming.
    "file_tab_style": "rounded",

image

heimer16 commented 3 years ago

I've tried the square setting as well. Even though the background appears to to all the way to the top, clicking at the top edge does not select the tab

OdatNurd commented 3 years ago

That sounds like a slightly different issue then; less of a graphical one and and more that the interactive area of the tab doesn't match the visual state.

heimer16 commented 3 years ago

I should also say, there is a configuration setting in the theme files called "hit_test_level" which, according to the documentation is: a float value setting the required opacity of a pixel for a click to be considering a "hit" in the default theme is set to 0.3. I tried setting this to different values, including 0, and it did not seem to have any effect on the default theme in rounded or square tab styles

heimer16 commented 3 years ago

I also thought maybe the hidden menu was taking up some space in the UI, but even with the menu visible, if I hit just the right spot, there is a space between the menu and the tabs (maybe a pixel or two?) where clicking does nothing. Doesn't activate the tab, the menu, or a new tab via double-click.

deathaxe commented 3 years ago

IMHO, rounded tabs need a little space above in order to not look broken, especially when rendered below another group/pane/view but also if they'd touch the main menu. That's not the case for square tabs though.

grafik

When using Adaptive theme it doesn't matter at all, because tabset background color is the same as the title bar.

grafik

heimer16 commented 3 years ago

I don't mind if there's some visual separation. It's more the functionality I'm after: with no window decoration and menu hidden, moving to the top edge of the screen and clicking should activate the tab. In other words, the clickable area for the tab should extend to the very top of the tab bar. at the moment there seems to be some "dead space" there. I think this could be achieved while still allowing for a visual gap

heimer16 commented 3 years ago

I created a few gifs to demonstrate.

Firefox: firefox

Sublime Text (safe mode, theme "auto", file_tab_style: square): sublime

Gap between menu and clickable tab: sublime-menu

heimer16 commented 3 years ago

I've updated the initial post to be more simple and clear on what the issue is.

deathaxe commented 3 years ago

I guess it could be achieved by an additional layer which renders with tabset background color above each tab. It involves removing all spacing from theme-file and tweaking textures as those would need to create the illusion of padding then.

heimer16 commented 3 years ago

I don't really mean to advocate for any fancy trickery to get an illusion of padding. If there's a visual gap, then I'm okay with the click not activating the tab. I guess my only goal is to make it so when I remove all padding/margin in the theme, then the clickable tab would actually extend to the top edge in full screen mode, as it seems to do in windows.

lua-rocks commented 2 years ago

I have the same problem and it is very annoying! It's the only reason I can't use sublime. I really like the functionality of your software, but this gap just kills me! 😢 I apologize for the emotions, but for some reason I am very sensitive to such things.

lua-rocks commented 2 years ago

screenshow