Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcut for next/previous tileset #1238

Closed
bitinn opened this issue Mar 26, 2016 · 13 comments
Closed

Keyboard shortcut for next/previous tileset #1238

bitinn opened this issue Mar 26, 2016 · 13 comments
Labels
feature It's a feature, not a bug. usability Generally about making something more intuitive or efficient.
Projects
Milestone

Comments

@bitinn
Copy link

bitinn commented Mar 26, 2016

After making a few maps with Tiled I really start to think a keyboard shortcut for next/previous tileset might be a good idea.

Instead of merging all tilesets into a monolithic large set, I really prefer to have around 10-20 tilesets where I can easily switch between and peek at.

I am not sure the performance impact of having multiple tilesets, maybe that depends on tile engine implementation. Large tilesets (say above 200 tiles per set) are a pain to search through.

Given we have tabs in the tileset view, keyboard shortcut feels like the correct decision for usability and convenience. What do you think?

@bjorn
Copy link
Member

bjorn commented Mar 27, 2016

There should be no real negative performance impact for having a large number of tilesets. In one of my projects there is a map with 58 tilesets without performance issues.

I'm fine with adding a keyboard shortcut for flipping through the tilesets, though I rather doubt that it is an effective way of navigation, especially if you're going to have more than a dozen of them. Much nicer would probably be if you could press a shortcut and then start typing a tileset name to select it. Of course that's a much more complicated feature to implement, but I think we need it also for other things (like opening maps and jumping to objects).

Any suggestions for these shortcuts? We have Alt+Left/Right for switching maps, so maybe Ctrl+Left/Right for switching tilesets?

@bjorn bjorn added the feature It's a feature, not a bug. label Mar 27, 2016
@bjorn bjorn changed the title Feature Request: keyboard shortcut for next/previous tileset Keyboard shortcut for next/previous tileset Mar 27, 2016
@bitinn
Copy link
Author

bitinn commented Mar 28, 2016

Thx for the reply.

Yep your suggestion might be better, a searchable tilemap list and a shortcut to search will help (it encourages better tileset naming as well). The drawback would be it requires quite a bit screen estate to present its UI properly.

Another option might be horizontally scrollable tab view? It will (1) be better than current arrow control (2) make re-ordering easier (you can hold the tab and scroll).

I think all I want is to avoid (a) clicking the tileset view dropdown a lot (b) clicking the arrow control a lot. I am fine with clicking on tabs.

Ctrl+Left/Right sounds good to me.

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

The drawback would be it requires quite a bit screen estate to present its UI properly.

Well, I'm thinking more along the lines of the Locator in Qt Creator, so that it would only require a single text entry field somewhere. Or as done in text editors like Sublime Text, it isn't visible at all and only pops up when used.

Another option might be horizontally scrollable tab view? It will (1) be better than current arrow control (2) make re-ordering easier (you can hold the tab and scroll).

I don't understand this suggestion. The tab view is already horizontally scrollable, right? The arrow just exists because the scrolling gets very annoying when you have many tilesets. Note that you can also use the scroll wheel to flip through the tilesets.

@bitinn
Copy link
Author

bitinn commented Mar 28, 2016

I don't understand this suggestion. The tab view is already horizontally scrollable, right?

Wait, it's not the case on OSX. Doesn't work with scroll wheel or trackpad.

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

Wait, it's not the case on OSX. Doesn't work with scroll wheel or trackpad.

Hmm, must be a missing feature of Qt on OS X... It works on Linux and Windows, at least. :-/

@bitinn
Copy link
Author

bitinn commented Mar 28, 2016

Or as done in text editors like Sublime Text, it isn't visible at all and only pops up when used.

I am used to this pattern due to being a ST user myself :)

Hmm, must be a missing feature of Qt on OS X

Should I open another ticket to track this? I hope I am not missing something, other part scrolls just fine.

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

I will try to set usesScrollButtons explicitly.

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

I will try to set usesScrollButtons explicitly.

Hmm, actually I just tried it on OS X and the tab bar already uses scroll buttons. The only thing that seems to not work is the mouse wheel to switch between tilesets. I guess that's again a system-specific behavior.

@bitinn
Copy link
Author

bitinn commented Mar 28, 2016

Hmm, actually I just tried it on OS X and the tab bar already uses scroll buttons.

screen shot 2016-03-28 at 4 43 09 pm

If you mean the arrow buttons, then yes they show up. But it doesn't response to mousewheel or trackpad gesture (say Macbook Air).

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

Right, so that's Qt's QTabBar implementation for wheel events:

void QTabBar::wheelEvent(QWheelEvent *event)
{
#ifndef Q_OS_MAC
    Q_D(QTabBar);
    int offset = event->delta() > 0 ? -1 : 1;
    d->setCurrentNextEnabledIndex(offset);
    QWidget::wheelEvent(event);
#else
    Q_UNUSED(event)
#endif
}

So, I could probably override this in a subclass and just enable that part on OS X as well. I guess OS X people will not expect this kind of behavior, but it may be better than doing nothing in this case.

@bitinn
Copy link
Author

bitinn commented Mar 28, 2016

Thx for going in depth on this issue. I am trying to think of an example of scrollable tab bar on OSX, I think sublime text's solution is pretty nice (without sacrificing individual tab size too much).

@bjorn
Copy link
Member

bjorn commented Mar 28, 2016

Alright, wheel events will be handled on this tab bar as of change d88813d, to be included in Tiled 0.16.

@bjorn bjorn added the usability Generally about making something more intuitive or efficient. label Feb 8, 2017
@bjorn bjorn added this to Tiled 1.3 (next feature release) in Roadmap May 31, 2019
@bjorn bjorn closed this as completed in 6671c1d Sep 3, 2019
Roadmap automation moved this from Tiled 1.3 (next feature release) to Recently Completed Sep 3, 2019
@bjorn
Copy link
Member

bjorn commented Sep 3, 2019

I finally decided to go for [ and ], but we can change it when we think of something better, and it can be configured in the Preferences. At least there are shortcuts for this now. :-)

@bjorn bjorn added this to the Tiled 1.3 milestone Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug. usability Generally about making something more intuitive or efficient.
Projects
Archived in project
Roadmap
  
Completed
Development

No branches or pull requests

2 participants