Guake 终端顶部有剩余空间

Guake 终端顶部有剩余空间

在 13.04 中启动 Guake 终端时,顶部留有 1-2 厘米的空间。即,guake 终端顶部边框位于屏幕顶部边缘下方 1-2 厘米。

我该如何修复这个问题,因为它在 12.10 中运行良好。

根据选定的答案,它现在已移至顶部,但是有人对侧面的两条小线有什么想法吗?(:)它一直困扰着我)

答案1

你可以通过使重力向上来解决这个问题。不,说真的 ;)

您需要对文件进行简单的更改/usr/share/guake/guake.glade。使用您喜欢的文本编辑器打开该文件,然后查找以下行

<property name="gravity">static</property>

修改这一行,使其显示

<property name="gravity">north</property>

保存文件,重新启动 Guake,间隙就消失了。

答案2

guake glade 导致终端返回菜单栏,我已经使用 nano /usr/bin/guake 做到了

找到这个并在返回之前添加 window_rect.y = 25

def get_final_window_rect(self):
        """Gets the final size of the main window of guake. The height
        is the window_height property, width is window_width and the
        horizontal alignment is given by window_alignment.
        """
        screen = self.window.get_screen()
        height = self.client.get_int(KEY('/general/window_height'))
        width = 100
        halignment = self.client.get_int(KEY('/general/window_halignment'))

        # get the rectangle just from the first/default monitor in the
        # future we might create a field to select which monitor you
        # wanna use
        window_rect = screen.get_monitor_geometry(0)
        total_width = window_rect.width
        window_rect.height = window_rect.height * height / 100
        window_rect.width = window_rect.width * width / 100

        if width < total_width:
            if halignment == ALIGN_CENTER:
                window_rect.x = (total_width - window_rect.width) / 2
            elif halignment == ALIGN_LEFT:
                window_rect.x = 0
            elif halignment == ALIGN_RIGHT:
                window_rect.x = total_width - window_rect.width
        window_rect.y = 25 # <<<<<<<<<<<<<<<<<<<<< here
        return window_rect

相关内容