Move Sidebar buttons + other

sl23
Posts: 161
Joined: 29.01.2013 10:04

Post by sl23 »

Thanks, I have already done that though. My point is that with the Sidebar closed, ie not in view, when you use the buttons to open functions of the Sidebar, you cannot close them.
This effectively makes those buttons useless. Because you then have to show the Sidebar in order to close the Side Panel. So you need to have the Sidebar always open if you want to use those functions. Which then makes hiding it pointless.
This is why each of those buttons really needs a Toggle function if you wish to use them and hide the Sidebar.

I hope that makes sense to you. :D
Live for an ideal and leave no place in the mind for anything else.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

>My point is that with the Sidebar closed, ie not in view, when you use the buttons to open functions of the Sidebar, you cannot close them.

Sorry, can you write more detailed? ie, what steps can I do to see the problem?
sl23
Posts: 161
Joined: 29.01.2013 10:04

Post by sl23 »

1. Create a new button for the command [cmd_ShowSidePanelAndSyntaxTree = 2547] I called it SideTree as an example.
2. Go to Menu/View/ToggleSideBar so that it isn't visible.
3. Click the new SideTree button to show the code tree.
4. Now try to hide the code tree!

You can't, unless you open the SideBar and click the Code Tree button on it. This invalidates the purpose of a single operation button, ie, open tree but not close.
If there is a second button contained within CudaText to close the tree, then that's a solution, but then creates unnecessary clutter when it's more efficient to have one button to toggle a function such as this.

So the order of operation to use this SideTree button is:
1. Click SideTree button to open the Tree.
2. Go to Menu/View/ToggleSideBar to show the SideBar. I have it hidden by default to provide a more distraction free environment.
3. Click the Code Tree button to Hide the SidePanel.
4. Then go to Menu/View/ToggleSideBar to hide it, as that is my requirement.
Live for an ideal and leave no place in the mind for anything else.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

> Now try to hide the code tree! You can't, unless you open the SideBar and click the Code Tree button

Hm, I just press F12 (default hotkey for View/ Toggle side panel) and this toggles the codetree. on and off. even with hidden sidebar. You can use F12

You can also put on toolbar the "ui: toggle side panel" (this is F12)
sl23
Posts: 161
Joined: 29.01.2013 10:04

Post by sl23 »

Ok, I see that now. But If you're going to use hotkeys, which I don't, then what's the point of buttons in the first place?
I'm not fan of trying to remember a thousand hotkeys for all the apps I use. Maybe it's because I'm not a programmer?

This toggle SidePanel works and is what I'm using, I'm just trying to point out a small flaw in the buttons. If you create a button, it should be able to toggle. I just see no purpose for a button to show something but not hide it? Sorry if I sound harsh, it's not meant that way.
Live for an ideal and leave no place in the mind for anything else.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

You do not sound harsh. it is ok wish. The point is that a user must have all actions in the Cmd Palette.
And plugin allows all commands.
Why action "show side panel and codetree" must TOGGLE?
For Toggle we have "ui: toggle side panel"
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

This action "show side panel and codetree" must ONLY SHOW, so that any plugin can be sure that action shows the tree (it calls the action w/o detecting show state). If plugin wants to TOGGLE, it can call "toggle side panel" action or use the API.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Next Cud update has new command "TOGGLE side panel / code tree". it is the solution. you should have requested it.
sl23
Posts: 161
Joined: 29.01.2013 10:04

Post by sl23 »

Thank you very much Alexey.
Do you have any ideas what could be causing the toolbar icons, as previously discussed, showing strangely?
Live for an ideal and leave no place in the mind for anything else.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Ah, i did not reproduce this, i still need the steps: how to repeat this issue. I cannot fix it using only your config file.
Post Reply