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

Add support for Gtk+ 3.20 and/or 3.22 #3446

Closed
Beep6581 opened this issue Oct 5, 2016 · 135 comments
Closed

Add support for Gtk+ 3.20 and/or 3.22 #3446

Beep6581 opened this issue Oct 5, 2016 · 135 comments
Assignees
Labels
type: enhancement Something could be better than it currently is

Comments

@Beep6581
Copy link
Owner

Beep6581 commented Oct 5, 2016

No description provided.

@Beep6581 Beep6581 added the type: enhancement Something could be better than it currently is label Oct 5, 2016
@Hombre57 Hombre57 self-assigned this Oct 9, 2016
@Hombre57
Copy link
Collaborator

Small update : I'm still in the process of solving the bugs to make RT/Gtk3 works with Gtk3.22. Wait for a patch during this week.

@Beep6581
Copy link
Owner Author

Thanks for the heads-up - I was about to start digging.

@Beep6581
Copy link
Owner Author

I tried to get RT works with gtk>=3.20, but I'm about to give up. Still on this issue at the moment.

@Hombre57 what is the problem?

@Hombre57
Copy link
Collaborator

The RT's theme just doesn't load. I have this warning message :
(rawtherapee.exe:3440): Gtk-←[1;33mWARNING←[0m **: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg. This may indicate that pixbuf loaders or the mime database could not be found.

Maybe it is related, or not. I hope so, otherwise I don't know why they doesn't load.

@Beep6581
Copy link
Owner Author

Beep6581 commented Oct 17, 2016

Is there a branch with your progress? I can take a look tomorrow.

@Hombre57
Copy link
Collaborator

Hombre57 commented Oct 17, 2016

I'll put them in gtk3-bugfix.

@Beep6581
Copy link
Owner Author

@vivo75 we are working on the same thing, please coordinate your work with us here. More to follow...

@vivo75
Copy link

vivo75 commented Oct 19, 2016

@Beep6581 I've looked at the thing and I'm not feeling able to go further the css thing, this would be the first gtk project for me, at the moment the following things destroy my hopes:

  • when searching the internet for changes 3.18 >> 3.20 only new features are mentioned not incompatibilities (or as I call it regressions) especially not how to fix them.
  • the widgets creation spawn hundreds of threads and the stack also reach considerable depth, this make debugging/understanding with gdb rather difficult
  • it's a lot of time I don't program c/c++ making me a little bit rusty in the area

I would ask for help but I know you are already rather busy and gtk 3.x is not a priority for the upcoming RT-5 release AFAIK (right decision IMHO)

that's the reason I've marked pull #3468 as "informative" @Hombre57 may or may not decide to use the additions to the css but there is not much more there
EDIT:
this blog post has some information on how to update applications for 3.20

@Hombre57
Copy link
Collaborator

Thank you for your work @vivo75, I'll take your PR as a resource in order to complete the revamp/update of the CSS file, and I'll certainly delete it when finished.

I've made some progress today, but nothing to commit yet.

What puzzle me the most is that free space of ~25px around the application itself ! I don't know where to change that, if possible at all !

@vivo75
Copy link

vivo75 commented Oct 20, 2016

@Hombre57 , I don't experience that, at least using the with both our changes (the one in the pull request)
screenshot_20161020_023535

@Beep6581
Copy link
Owner Author

@Hombre57 I can help you with that if you point it out in a screenshot and commit your latest changes.

@Beep6581
Copy link
Owner Author

@Hombre57

* { font-family: sans-serif; font-size: 8px; } /* Probably not a good idea to use *, better to target specifically */
tab { padding: 0; background-color: #000066; }
tabs { background-color: #006600; font-family: }
header { background: #ff0000; font-family: }

paned box { background-color: #00ffcc; }
paned box { padding: 5px; margin: 5px; }
notebook stack { background-color: #ffcc00; padding: 40px; }

@Hombre57
Copy link
Collaborator

@vivo75 Sorry, I forgot to say it was on Windows.

This is what I get when clicking on the Maximize icon : http://imgur.com/a/SM0hR

@Beep6581
Copy link
Owner Author

@Hombre57 I'd like to merge master into gtk3, but I don't want to cause merge issues for gtk3-bugfix. What do you suggest?

@Hombre57
Copy link
Collaborator

You can do it, I'll forward the merge to the gtk3-bugfix branch.

@Beep6581
Copy link
Owner Author

Monday is the last chance to make an October release. @Hombre57 what are you feelings on merging gtk3-bugfix into gtk3 by then? There must still be time to test that the merge does not break things for Gtk+ 3.16-3.18.

I will merge master into gtk3 tonight.

@heckflosse
Copy link
Collaborator

@Beep6581 @Hombre57 I'll test using 3.18 on Win7

@heckflosse
Copy link
Collaborator

heckflosse commented Oct 28, 2016

@Beep6581 I pushed a new branch. It is master merged into a copy of gtk3 branch. I didn't want to push directly to gtk3 branch, but you can use it to solve the merge conflicts when you merge master into gtk3 branch.
Edit: please delete the integration branch after master has been merged into gtk3

@Beep6581
Copy link
Owner Author

Thank you @heckflosse , merged and deleted.

@Hombre57
Copy link
Collaborator

@TooWaBoo The headerbar bg color is #262626 so we'll see no difference here, excepted that there will be one more pixel around the window.

@TooWaBoo
Copy link
Contributor

@Hombre57
I've found this on the i-net. Maybe it helps.

http://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2

Actually, Gtk+3 been compatible with Windows 10 and you can use the native windows theme by making this your default theme.
gtk-theme-name = MS-Windows

@Hombre57
Copy link
Collaborator

Thanks @TooWaBoo , I came across this too, but it look like this is a theme that mimics the native theme but doesn't use the host window manager theme. They even say the it create Win7 windows on Win10 OS. Anyway, I'm fine with actual RT's theme now that you gave me the solution on how to make the window resizable. Our theme is based on Adwaita so it's better to keep gtk-theme-name = Adwaita

@TooWaBoo
Copy link
Contributor

@Hombre57
I've found a better and nicer way for the window issue. I've only add a solid 5px border around the window. This should be cut off in Linux and would be a nice workaround (see screenshots below). Can you provide some screenshots in Linux if everything looks like I'm expecting, please?
TooWaBlue-no-dd-win-GTK3-20_.txt
In rtwindow.cc, I saw that you are dealing with the window states maximize and fullscreen. Is it a big job to assign these states to the window as a class? If it can done quickly, I can do some test with the window decoration to switch it on and off on the fly. This would solve the everything.

1
2
3
4
5

@Hombre57
Copy link
Collaborator

Hombre57 commented Dec 17, 2016

@TooWaBoo Sorry, I don't understand what you mean by assign these states to the window as a class If you mean assigning and removing a class when switching state, then yes it's easy. We could even suppress the whole headerbar.

@TooWaBoo
Copy link
Contributor

TooWaBoo commented Dec 17, 2016

... assigning and removing a class when switching state, then yes it's easy.

Yes, that's what I mean. Sorry about my bad English.
To get a perfect window control, these states would be necessary:
maximized, fullscreen, active and maybe minimized (but what can you see, when the window is minimized?, hmmm)

Edit: But there is still one point left which can't be done in the theme. The maximize butten has to change to a restore butten in maximized state and the window has to be set to it's pevious size when you click on it. Right now, when the window is maximized, the button does nothing.

@Hombre57
Copy link
Collaborator

What I don't understand from the documentation is that e.g. window.maximized already exist but doesn't seem to be attached automatically, they don't say that we have to assign it ourselves neither... Anyway I'm adding that feature now.

@TooWaBoo
Copy link
Contributor

What I don't understand from the documentation is that e.g. window.maximized already exist but doesn't seem to be attached automatically

That's what I thought too and it didn't work.

@TooWaBoo
Copy link
Contributor

@Hombre57
I think I've found the cause of the window problem. In Windows, when you move a window to a screen border it becomes maximized. I did that with a dialog window. The dialog became maximized, the decoration was automatically removed without doing anything special and the class .maximized was assigned to the dialog.

There must be a misconfiguration for the main window.

@heckflosse
Copy link
Collaborator

In Windows, when you move a window to a screen border it becomes maximized.

I can not confirm that on my Win7/64

@Hombre57
Copy link
Collaborator

I confirm that with my Win7/64 ; try with the Preferences window.

@TooWaBoo
Copy link
Contributor

@heckflosse

You have to move the window, until the mouse pointer touches the screen border.

@Hombre57
Copy link
Collaborator

Thanks for the hint, it then took me 20mn to find the problem. The great thing is that now we can unmaximize the window ! This should solve the issue on all OS that has Client Side Decoration.

@heckflosse
Copy link
Collaborator

You have to move the window, until the mouse pointer touches the screen border.

I confirm that it works with most windows. I tried with current master branch main and preferences window. There it does not work. I didn't try with rt gtk3-bugfix branch because the statement was:

In Windows, when you move a window to a screen border it becomes maximized.

which implied that it does so for all windows...

@TooWaBoo
Copy link
Contributor

TooWaBoo commented Dec 23, 2016

@Hombre57
In the RT theme, you set this style:

window > decoration, dialog > decoration {
    box-shadow: none;
    margin: 0px;
    border-style: none;
    border-radius: 0;
    padding: 3px;
    background-color: #262626;
}

Change it into this, because RT handels the decoration automatic and you get the full resize area back.

window > decoration, dialog > decoration {
    border-radius: 0;
    padding: 3px;
    background-color: #262626;
}

This is not necessary and can be deleted.

window.maximized > decoration, window.fullscreen > decoration {
    padding: 0;
    margin: 0;
}

Hombre57 added a commit that referenced this issue Dec 25, 2016
This commit change the way that the Curve buttons and Accompanying
object expands, and fix the alignment of the WB's buttons.
@dnw3039
Copy link

dnw3039 commented Dec 26, 2016

I am using the latest gtk3-bugfix Version: 4.2.1443. on Ubuntu 16:10. Rawtherapee theme and font size 10.

When I try to use the tool "reset to default" arrow the right side bar for dragging down the tool panel expands to cover about half the arrow button and makes it hard to accurately hit. (see the screen pic). I understand the side bar expands to make it more visible. I think it needs to expand a bit less or there needs to be a bit more margin between it and the arrow button.

screen

@Hombre57
Copy link
Collaborator

@dnw3039 This has been solved in a recent commit (i.e. this month) - duplicate of issue #3548.

@TooWaBoo
Copy link
Contributor

Need a bit help. Can someone give me three sceenshots like below from Linux, please? Because menus are windows too and I don't know what is rendered by a native window.
Use this theme, please:
TooWaBlueTest-2.25-GTK3-20_.txt
unbenannt
unbenannt2
unbenannt3

@Beep6581
Copy link
Owner Author

As of now, please do not use the gtk3-bugfix branch anymore. It has been merged into gtk3 and will soon be deleted.

git checkout gtk3
git pull
git branch -D gtk3-bugfix

Please use master for GTK2 builds and gtk3 for GTK3 builds.

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 6, 2017

@Hombre57 as the scrollbar issue is a GTK+ bug, do we consider this to be solved and close it, or are you working on a workaround?

@dnw3039
Copy link

dnw3039 commented Jan 6, 2017 via email

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 6, 2017

@TooWaBoo
Copy link
Contributor

TooWaBoo commented Jan 6, 2017

@Beep6581
Thanks, looks identical, except the profile menu. There's no shadow.

@Hombre57
Copy link
Collaborator

Hombre57 commented Jan 6, 2017

@Beep6581 I'm not working on the Scrollbar bug nor the Curves' one and don't plane to do so. I didn't had time to post in Bugzilla yet, I'm very busy this week and will also be off for this w.e., my boss asked me to work at home for the whole w.e.

There is a Gtk3.24 out or around the corner. I don't think that it is fixed in that release though, bugzilla doesn't say so. You should probably create a tag to let everyone know that we're waiting on a dependency fix and leave the issue opened, otherwise someone will open a new one.

@Beep6581
Copy link
Owner Author

Beep6581 commented Jan 6, 2017

@Hombre57 then I will close this issue and refer people from the release notes or somewhere to the scrollbar issue #3545 and the curves issue #3525.

Thank you so much for all the time and effort you put into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Something could be better than it currently is
Projects
None yet
Development

No branches or pull requests

10 participants