Changeset 6e7a465a714dfa3038e4278695b5ac2b7c8748a1
- Timestamp:
- 02/24/09 17:02:40 (3 years ago)
- Author:
- Lincoln de Sousa <lincoln@…>
- Children:
- 6d096f8af078a57e656457af75c0c80d0ee5afe4
- Parents:
- 4c3249ae933490bae2947df246d18404dcec59d6
- git-author:
- Aleksandar Krsteski <alekrsteski@…> (02/19/09 02:52:51)
- git-committer:
- Lincoln de Sousa <lincoln@…> (02/24/09 17:02:40)
- Message:
-
Add support for real (ARGB) transparency when available.
Guake by default will use real transparency with alpha channel if
available. In preferences window it uses Opacity slider to control the
terminal transparency which is only visible when background image is not
set.
Signed-off-by: Aleksandar Krsteski <alekrsteski@…>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r4c3249a
|
r6e7a465
|
|
| 249 | 249 | i.set_background_transparent(False) |
| 250 | 250 | else: |
| 251 | | i.set_background_transparent(True) |
| | 251 | """We need to clear the image if it's not set but there is |
| | 252 | a bug in vte python bidnings which doesn't allow None to be |
| | 253 | passed to set_background_image (C GTK function expects NULL). |
| | 254 | The user will need to restart Guake after clearing the image. |
| | 255 | i.set_background_image(None) |
| | 256 | """ |
| | 257 | if self.guake.has_argb: |
| | 258 | i.set_background_transparent(False) |
| | 259 | else: |
| | 260 | i.set_background_transparent(True) |
| 252 | 261 | |
| 253 | 262 | def bgopacity_changed(self, client, connection_id, entry, data): |
| … |
… |
|
| 259 | 268 | for i in self.guake.term_list: |
| 260 | 269 | i.set_background_saturation(opacity / 100.0) |
| 261 | | i.set_opacity(opacity) |
| | 270 | if self.guake.has_argb: |
| | 271 | i.set_opacity(int(opacity / 100.0 * 65535)) |
| 262 | 272 | |
| 263 | 273 | def backspace_changed(self, client, connection_id, entry, data): |
| … |
… |
|
| 478 | 488 | self.mainframe = self.get_widget('mainframe') |
| 479 | 489 | self.resizer = self.get_widget('resizer') |
| | 490 | |
| | 491 | # check and set ARGB for real transparency |
| | 492 | screen = self.window.get_screen() |
| | 493 | colormap = screen.get_rgba_colormap() |
| | 494 | if colormap != None and screen.is_composited(): |
| | 495 | self.window.set_colormap(colormap) |
| | 496 | self.has_argb = True |
| | 497 | else: |
| | 498 | self.has_argb = False |
| 480 | 499 | |
| 481 | 500 | # List of vte.Terminal widgets, it will be useful when needed |