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

Gap between panel and terminal solution? #228

Open
Jont828 opened this issue Dec 12, 2018 · 2 comments
Open

Gap between panel and terminal solution? #228

Jont828 opened this issue Dec 12, 2018 · 2 comments

Comments

@Jont828
Copy link

Jont828 commented Dec 12, 2018

I saw how there's a small gap in between the terminal and the Gnome top panel when I use 2x zoom for a high DPI display and saw some of the solutions in the previous issues, but they didn't seem to be working.

I went into extension.js and changed the line so it becomes this._windowY / 2 instead, and it seems to fix it for my 2x display, but unfortunately, if I switch to 1x/normal zoom, the terminal ends up being out of place since it's partially covered by the top bar now.

// applies the change dynamically if the terminal is already spawn
if (this._busProxy !== null && this._windowHeight !== null) {
	this._busProxy.SetGeometryRemote(this._windowX, this._windowY / 2, this._windowWidth, this._windowHeight);
	// this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
} else if (this._windowActor != null) {
	this._windowActor.set_position(this._windowX, this._windowY);
}

Does anyone know how to check if it's on 1x or 2x zoom in the JS file? I'd like to add an if statement that either sets the second argument to this._windowY or this._windowY / 2 depending on the zoom setting.

@Jont828
Copy link
Author

Jont828 commented Dec 17, 2018

So I've made the following change, what do you think?

        if (this._busProxy !== null && this._windowHeight !== null) {
            if(scaleFactor === 2) {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY / 2, this._windowWidth, this._windowHeight);
            } else {
                this._busProxy.SetGeometryRemote(this._windowX, this._windowY, this._windowWidth, this._windowHeight);
            }
        } else if (this._windowActor != null) {
            this._windowActor.set_position(this._windowX, this._windowY);
        }

@adrixo
Copy link

adrixo commented Jan 13, 2020

Ou yeah, that works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants