Opened 13 years ago
Closed 10 years ago
#8156 closed enhancement (fixed)
Installing Workspaces into Deskbar should be easier
Reported by: | rq | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Workspaces | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I just figured out today that I actually can install a Workspaces replicant into Deskbar. But it's quite cumbersome: one has to manually resize the Workspaces window and then drag a replicant. I would like to suggest adding a context menu item which would automatically create a replicant of optimum height in the Deskbar.
One possible caveat is that this should probably only be enabled when all workspaces are arranged in a horizontal strip, because Deskbar only accepts replicants up to certain height.
Attachments (3)
Change History (20)
by , 13 years ago
Attachment: | Workspaces.patch added |
---|
comment:1 by , 13 years ago
patch: | 0 → 1 |
---|
comment:2 by , 13 years ago
The attached patch adds a "Live in the Deskbar" item to the context menu. It's not ideal though: I hardcoded the size of the deskbar replicant instead of calculating it properly, since I have no idea how to implement it. I'd say idealy its dimentions would be calculated somewhat like this:
Height = 15px
Width = (ScreenWidth / ScreenHeight * numHorizontalDesktops / numVerticalDesktops * 14 + 1) px
(note I multiplied by 14 instead of 15 to account for borders between and around the desktop previews)
by , 13 years ago
Attachment: | workspaces2.patch added |
---|
Alternative patch, also removes any "About" functionality
follow-up: 4 comment:3 by , 13 years ago
mmadia suggested that I also get rid of the "About Workspaces" menu item. Second patch does that, but with a little caveat: a replicant will still have this non-functional About menu item.
follow-up: 5 comment:4 by , 13 years ago
Replying to rq:
mmadia suggested that I also get rid of the "About Workspaces" menu item. Second patch does that, but with a little caveat: a replicant will still have this non-functional About menu item.
It's best to move the removal of About Workspaces to a new ticket. Even better to have the patch independant from this ticket's patch.
comment:5 by , 13 years ago
Replying to mmadia:
It's best to move the removal of About Workspaces to a new ticket. Even better to have the patch independant from this ticket's patch.
These being two separate enhancements is the reason why I didn't mark the first patch as obsolete. The two patches would likely be conflicting though, or depend on each other. In any case, I'm happy to create a separate ticket and a new patch for it once this gets reviewed and approved.
Bare in mind though, that I'm not a skilled coder, so if the patch here will need improvements, it's quite likely that I won't be able to add them.
comment:6 by , 13 years ago
Committed a reworked version as hrev43367. I left the about issue out though.
by , 13 years ago
Attachment: | workspaces-deskbar-correct-width.patch added |
---|
Additional patch, which implements smarter calculation of the replicant size.
comment:10 by , 13 years ago
hm, I see you made another checkin, which decreases both width and height by 1 (hrev43432). Why would you do that? The replicant works correctly without it.
follow-ups: 12 13 comment:11 by , 13 years ago
Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...
comment:12 by , 13 years ago
Replying to mmu_man:
Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...
weird... 1) I was pretty sure that Deskbar would simply not accept replicants higher than 16px. Does it accept them for you? 2) so (0,0,100,16) actually means that the replicant is 17px tall? Is that because the first arguments are zero?
follow-up: 16 comment:13 by , 13 years ago
Replying to mmu_man:
Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...
Actually, I think you should probably fix my comment and initial constants too then (to state that a replicant can be 17x130). My goal was to have the replicant as tall as possible, and not exceed width allowed in Deskbar's vertical mode.
Should I attach another followup patch, or can you change the constants yourself?
PS. I have no idea why ProcessController would use a replicant that is 1px smaller than it can be. Perhaps it (and other applications, if any) should be fixed too.
comment:15 by , 12 years ago
patch: | 1 → 0 |
---|
comment:16 by , 12 years ago
Replying to rq:
Replying to mmu_man:
Because the rect was actually created with 1 more pixel height and width than advertised. If you want 17 as height then use 17. It actually works but it's larger than others like ProcessController. OTOH it looks better with 2-rows workspaces setup but well...
Actually, I think you should probably fix my comment and initial constants too then (to state that a replicant can be 17x130). My goal was to have the replicant as tall as possible, and not exceed width allowed in Deskbar's vertical mode.
Should I attach another followup patch, or can you change the constants yourself?
A followup patch would be appreciated -- ideally one that is made with git format-patch. This will give you a better level of recognition for your contribution. Thanks!
comment:17 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Nothing to do here, patches were applied already.
Patch adding the "Live in the Deskbar" item to the context menu