Comments (7)
This is a duplicate of issue #3. There appears to be no solution to this problem using public APIs. I believe the only way to work around this would be to create a completely custom window that mimics the appearance of a standard window, except with the centered traffic lights and larger titlebar (as INAppStoreWindow does). I currently do not have time to create something like that, but I believe @Perspx is working on it.
from inappstorewindow.
Indeed, I have got the window buttons to work; I still have a few things to fix before i release it. If not as a full project I'll release it as a gist or a blog post.
from inappstorewindow.
@Perspx, just curious what you did to get the buttons to work? I'm using this project but I haven't been able to fix this bug yet.
from inappstorewindow.
Sure, I've posted it as a gist, which can be found here https://gist.github.com/972958
The way the window handles the window buttons is that it uses a tracking area for the rectangle where the buttons should be. When the mouse is hovered in this rectangle, the buttons change their display to the hover state.
Therefore altering this is pretty easy: all you have to do is swap out the existing tracking area with a new one, for your updated rectangle. The tracking area is on the window's theme frame (the view which draws the window bar etc) so you find the tracking area being used, and use your updated rectangle.
Unfortunately, NSTrackingArea
has no public -setRect:
method (there is a private -_setRect:
method which I believe works, but I was going for public APIs) so what you have to do is create a new tracking area with the same values as the old tracking area, except for your updated rectangle. Also, for some reason, the userInfo
property can't be nil
, it has to be [NSDictionary dictionary]
for some reason which I'm not entirely sure about.
If you do that then the buttons will appear in the hover state when you mouse over this new rectangle.
from inappstorewindow.
I've implemented @Perspx's fix in the latest commit (e0d0006). I'm unable to test this because I'm currently running a beta version of Mac OS X which has some notable differences in the ways tracking areas are used in the theme frame. If you guys could test on Snow Leopard and let me know if it works, that would be fantastic :-)
from inappstorewindow.
There was a one-liner fix, but otherwise worked as expected. I've sent you a pull request.
from inappstorewindow.
I've merged the pull request, hopefully all issues are solved now :) Thanks @Perspx for all the assistance!
from inappstorewindow.
Related Issues (20)
- when click minButton to hidden the window, then reopen,move mouse to traffic button and remove mouse, the traffic button always show RollOverImage
- Exit full screen mode in Yosemite HOT 7
- dragging to another virtual desktop is not working
- window frame.height grows from start to start if autosave name is not empty, OS X 10.9.3
- README needs update
- setMovable flag doesn't work
- Box behind title Xcode 6.1 GM HOT 2
- Yosemite double click title bar to maximum window not working HOT 1
- Cocoa pod can't find INAppStoreWindow 1.5
- bad window button positioning on Yosemite HOT 4
- TitleTextColor changes only the Window Title !
- bad way to detect yosemite
- crash, creating window from code inherit INAppStoreWindow 10.10.1 HOT 3
- Window widgets are positioned incorrectly in document-based application when showing sheets HOT 2
- Graphite system appearance appears to be ignored
- Where do I start HOT 1
- AppleMiniaturizeOnDoubleClick Isn't working HOT 2
- Window flicker when drag in the original titlebar area and move to top of the screen
- Traffic light buttons HOT 2
- Every Time At the time of Launch : NSWindow warning: adding an unknown subview: HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inappstorewindow.