Commit Graph

25 Commits

Author SHA1 Message Date
spx
54fe29a062 Removed unused codes.
Some small changes on create Measures and Meters.
2010-04-07 19:56:53 +00:00
spx
415c905d0a - Fixed a problem that !RainmeterQuit isn't executed when no meter window is running.
- Fixed a problem that StyleTemplate affects to Meters which have no relation.

- Added a workaround to avoid the "IniFileMapping" function when reading skins.

- Some small code cosmetics.
2010-04-02 01:35:53 +00:00
spx
b769a7a360 - Modified the way to handle the "On Desktop". This affects all of Windows versions.
- Added "LoadOrder" to handle the skins' loading order.

- Changed the way to update and save the network statistics.
2010-03-29 21:50:05 +00:00
spx
06ec730bfd - Added the workaround to pin the window to desktop in Vista/7 with Aero.
- Added !RainmeterSetTransparency, !RainmeterShowFade, !RainmeterHideFade, !RainmeterToggleFade.

- Added the function to log the installed font families to the log file when Debug=1 is set.

- Added the workaround for issue 145. The wrong drawing position was fixed when AntiAlias=0 is set.
2010-03-20 19:40:30 +00:00
spx
6088470157 - CHANGED: ConfigParser now reads value strictly. Note that this change affects the
reading of various skin setting values.

 For instance:
 - OK
  FontSize=10
  FontSize=0
 - NG (uses default value instead)
  FontSize=
  FontSize=ABC
  FontSize=20ABC (has been parsed as "FontSize=20" until now.)

- CHANGED: FontSize=0(invisible) is now able to use in Meter=STRING.

- Fixed the problem that the window doesn't move into the screen correctly when KeepOnScreen is 1.
2010-02-08 14:12:47 +00:00
spx
cc3ad487a7 * Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)

-----

* Added the "Display Monitor" submenu in [Skins Menu]-[Position].

These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)

- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.

AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.

-----

* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.

The following variables are for the virtual screen.

 #VSCREENAREAX# is the X-position of the left-side of the virtual screen.
 #VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
 #VSCREENAREAWIDTH# is the width of the virtual screen.
 #VSCREENAREAHEIGHT# is the height of the virtual screen.

The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.

 #WORKAREAX# is the X-position of the left-side of the work area.
 #WORKAREAY# is the Y-position of the top-side of the work area.
 #WORKAREAWIDTH# is the width of the work area.
 #WORKAREAHEIGHT# is the height of the work area.
 #SCREENAREAX# is the X-position of the left-side of the monitor screen.
 #SCREENAREAY# is the Y-position of the top-side of the monitor screen.
 #SCREENAREAWIDTH# is the width of the display resolution.
 #SCREENAREAHEIGHT# is the height of the display resolution.

The following variables are for the PRIMARY monitor.

 #PWORKAREAX# is the X-position of the left-side of the work area.
 #PWORKAREAY# is the Y-position of the top-side of the work area.
 #PWORKAREAWIDTH# is the width of the work area.
 #PWORKAREAHEIGHT# is the height of the work area.
 #PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
 #PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
 #PSCREENAREAWIDTH# is the width of the display resolution.
 #PSCREENAREAHEIGHT# is the height of the display resolution.

The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)

 #WORKAREAX@n# is the X-position of the left-side of the work area.
 #WORKAREAY@n# is the Y-position of the top-side of the work area.
 #WORKAREAWIDTH@n# is the width of the work area.
 #WORKAREAHEIGHT@n# is the height of the work area.
 #SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
 #SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
 #SCREENAREAWIDTH@n# is the width of the display resolution.
 #SCREENAREAHEIGHT@n# is the height of the display resolution.

-----

* Other related changes:

- Fixed the problem that the primary monitor isn't recognized correctly.

- Fixed the problem that the information of the multiple display monitors is refreshed excessively.

- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.

- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.

- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)

-----

* Other changes:

- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.

- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.

- Fixed the problem that the Meter's hit-test code checks outside the area.

- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
jsmorley
fd9cac7add Change by MattKing to the MouseActionCursor feature. The user can now set MouseActionCursor=0 in the [Rainmeter] section of the skin, and the change of the cursor to the hand when over mouse action meters will be disabled for the entire skin. This can be overridden on a meter-by-meter basis with MouseActionCursor=1.
Added this change to the Meters.htm help file.
2009-10-30 18:15:13 +00:00
Kimmo Pekkola
b5042589cb The deactivated window wasn't deleted properly (issue 117).
Deactivating a config kept it still activate in the rainmeter.ini file (issue 118).
2009-10-18 13:31:55 +00:00
Kimmo Pekkola
1de7706678 If native transparency is enabled the windows are not refreshed anymore when settings change but they are just moved to the correct location. 2009-09-18 16:05:10 +00:00
jsmorley
48bee2c6fe 1) Added MattKing's code for supporting the middle mouse button in [Rainmeter] and [MeasureName].
MiddleMouseUpAction | MiddleMouseDownAction

2) Updated the manual entries for the middle mouse functionality

3) Added  spx268's code to fix a problem with BUTTON and dynamic variables addressed in:

http://code.google.com/p/rainmeter/issues/detail?id=108
2009-09-07 16:37:58 +00:00
Kimmo Pekkola
4274397806 The m_FontCollection wasn't initialized so it could cause a crash on exit.
Some code cleanup.
2009-09-04 17:18:15 +00:00
Kimmo Pekkola
4bf4e51126 Reverted the changes from r209. 2009-09-04 16:37:51 +00:00
jsmorley
8239919333 Added MeterStyle functionality:
Rainy, given the "issues" listed at the bottom of this comment, I leave it to you whether to create a build using this revision or use r208 for the build.  I would like to start testing MeterStyle, but there are a few more things it needs work on.

What is MeterStyle?

MeterStyle
This will allow users to create CSS-like "Styles" for meters. This means that all the parameters of a meter can be defined in the style, and then many meters can use the style to eliminate copy / pasting the same parameters over and over on multiple meters. (Examples: FontColor=, FontSize= etc.)

How do I use it?

You will create a new [Section] (as many as you want) in the .ini. The section(s) can have any name.

[MyStringStyle]

Then you will tell Rainmeter that this is a "MeterStyle" and not a measure or meter

Style=Meter

Note: The "value" of the key "Style" can be anything. It can be used to add a description of the style if you like. Style=This style is for the AccuWeather part of this skin
It is however required, both to tell Rainmeter it is not a meter or measure and to have the MeterStyle routines parse it.

Then you define parameters you want to use in the style

FontColor=#FontColor#
FontFace=TheSansBold-Caps
FontSize=11
StringEffect=SHADOW
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1

Then in any or all meters, you just use

[MeterName]
Meter=STRING (or any other meter type)
MeterStyle=MyStringStyle

None of the parameters in the style are then required to be actually in the meter(s). They are "inherited" from the MeterStyle.

Note: This works and has had preliminary testing with dynamic variables like FontColor=[MeasureName] and regular variables like FontColor=#FontColor#. It doesn't matter if the [Variables] section or the [MeasureName] measure is before or after the [StyleName] in the .ini file.

What if I want to override a MeterStyle parameter on a meter?

Sure. Just put in any parameter with a value different from the one defined in the MeterStyle and the one in the meter will take presidence. All non-defined parameters will still use the MeterStyle value.

[MeterName]
Meter=STRING
MeterStyle=MyStringStyle
FontColor=100,100,100,50

What are these "known issues" you are on about?

This is still a bit of a work in progress. Right now you cannot define X or Y in a style. You can define W and H, but NOT for a STRING meter. You cannot define a "Transformation Matrix" in a style. MattKing will be looking into these tomorrow. W and H in a string meter is our top priority. We will also look at X and Y and hope for an easy solution. Transformation Matrix may have to come later.
2009-09-04 14:48:28 +00:00
jsmorley
dc365cfb6e Reconciled all changes by Rainy and the branch with MattKing's LocalFont function. The trunk now contains all current code changes.
Added changes to RANDOM function based on Rainy's input.  If there were multiple RANDOM statements in multiple CALC measure, they would all get the same random number.  Fixed.

Added new RANDOM function and LocalFont to the help files and History.htm
2009-09-03 00:33:46 +00:00
Kimmo Pekkola
dc3c767efa It's now possible to use the measures as if they were variables (use [MeasureName] instead #VariableName#). Set DynamicVariables=1 for all meters and measures which refer to other measures.
New bang !RainmeterSetVariable can be used to change the value of a variable (DynamicVariables must be 1 in places where the variable is used).
2009-08-26 17:37:15 +00:00
Kimmo Pekkola
40f11d3934 !RainmeterRefresh and !RainmeterQuit are now handled only during the event loop since they can crash the application if executed during Update(). 2009-08-19 17:57:09 +00:00
Kimmo Pekkola
e73d35e220 New !bang: !RainmeterQuit 2009-08-04 09:48:03 +00:00
Kimmo Pekkola
a7c6c939ac Skins are now read from the My Documents by default.
Added the revision number to the about dialog (use UpdateRevision.py to update it).
Added a check to the startup which verifies that the rainmeter.ini is writable.
The skin folder can be opened from the context menu.
2009-07-24 07:56:37 +00:00
Kimmo Pekkola
e2448f42b1 Added 64-bit compilation configuration.
The bitmap meter supports transition frames now.
Few Vista/Win7 fixes (the rainmeter.ini is now in %APPDATA%).
2009-07-21 12:26:50 +00:00
Brian Todoroff
1bd2045f13 -Removed the AllowNegativeCordinates option. 2009-03-27 01:55:12 +00:00
Brian Todoroff
537f02146f -Fixed several bugs in real time resolution changes
-Added AnchorX and AnchorY to the config and help
-Added some of the build directories to the ignore list for svn
2009-03-26 04:16:57 +00:00
Brian Todoroff
78bc4ba9dc Detect and handle resolution changes while running 2009-03-25 02:56:56 +00:00
Brian Todoroff
8a66cc73c0 Positioning from right/bottom, as a percentage of screen, and multi-monitor selection implemented. Updated context menu Position sub-menu and help files. Dragging should work for all options.
Removed dependencies from Library on plug-in .DLL's.
2009-03-24 04:29:48 +00:00
Kimmo Pekkola
5d2f960552 Code cleanup. 2009-02-14 10:11:28 +00:00
Kimmo Pekkola
30edc895f2 2009-02-10 18:37:48 +00:00