从头开始vue创建项目_从头开始创建Windows 7主题包
從頭開始vue創(chuàng)建項目
Windows customization isn’t anything new, but with Windows 7, customization got a lot easier with theme packs. Here is how you can create your own theme pack from scratch.
Windows自定義并不是什么新鮮事物,但是在Windows 7中,主題包使自定義變得更加容易。 這是您可以從頭開始創(chuàng)建自己的主題包的方法。
Creating a theme pack from scratch is a lot more work than using built in tools, but it gives you a lot more flexibility by allowing you to creating brand icons, RSS background feeds, and customizing every feature which may not be easy to do through Windows native tools. When you are going to create a theme that you can share with others you will want to take into account what exactly you will be able to change that others will be able to use. Windows 7 theme packs allow you to customize the desktop background (including “slide show” backgrounds, and RSS feed backgrounds), screen saver, system sounds, desktop icons, mouse pointers, and system colors.
從頭開始創(chuàng)建主題包要比使用內(nèi)置工具來做得多,但是通過允許您創(chuàng)建品牌圖標,RSS背景供稿并自定義每個功能(通過Windows可能不容易),它為您提供了更大的靈活性。本機工具。 當您要創(chuàng)建可以與他人共享的主題時,您將需要考慮到您將能夠確切地更改他人可以使用的主題。 Windows 7主題包允許您自定義桌面背景(包括“幻燈片放映”背景和RSS feed背景),屏幕保護程序,系統(tǒng)聲音,桌面圖標,鼠標指針和系統(tǒng)顏色。
Customize your theme
自定義主題
Start the theme pack by gathering all the files you want to use for your customization. Remember to get items for every part you are going to customize. If you do not specify parts to theme, the system will use the defaults that come with windows. So if you don’t find a mouse cursor you like, Windows will use the default cursor for the system. Once you have the files you want, put them all in a folder that you can easily get to. I am going to be building a theme based on the Matrix wallpapers we posted recently.
通過收集要用于自定義的所有文件來啟動主題包。 記住要獲取要定制的每個零件的物品。 如果您沒有為主題指定零件,則系統(tǒng)將使用Windows隨附的默認值。 因此,如果找不到所需的鼠標光標,Windows將使用系統(tǒng)的默認光標。 擁有所需的文件后,將所有文件都放在一個可以輕松訪問的文件夾中。 我將基于我們最近發(fā)布的Matrix壁紙構(gòu)建主題。
We will start the customization by generating the .theme file. This file is the heart of your theme pack and will tell Windows which media file to use where. The .theme file is really just a specially formatted text file so start by right clicking in your folder and creating a new text document. Name the file whatever you want and open it with your favorite text editor.
我們將通過生成.theme文件開始自定義。 該文件是主題包的核心,它將告訴Windows在哪個位置使用哪個媒體文件。 .theme文件實際上只是一種特殊格式的文本文件,因此首先右鍵單擊您的文件夾并創(chuàng)建一個新的文本文檔即可。 隨意命名文件,然后使用您喜歡的文本編輯器將其打開。
The .theme file is going to be broken up into sections. The first section is the [Theme] section. The [Theme] section only has two options, the theme display name, and the theme icon. The display name can be whatever you want the theme to be called in the control panel > personalize window, and the icon graphic must be a PNG file. The graphic will be scaled to 80×240 so use something close to that resolution or ratio.
.theme文件將分為幾部分。 第一部分是[主題]部分。 [Theme]部分只有兩個選項,主題顯示名稱和主題圖標。 顯示名稱可以是您希望在控制面板>個性化窗口中調(diào)用主題的任何名稱,并且圖標圖形必須是PNG文件。 圖形將縮放為80×240,因此請使用接近該分辨率或比例的圖像。
Note: The theme icon will only show up under the Control Panel > Personalization window so don’t worry if you don’t see the icon.
注意:主題圖標只會顯示在“控制面板”>“個性化設置”窗口下,因此如果您沒有看到該圖標,請不要擔心。
The rest of the [Theme] section will tell windows which icons to use for the desktop icons (Computer, Documents, Recycle Bin, Network). For icon files you can use either standalone .ico files, or you can use icons embedded in .exe or .dll files also. For .exe and .dll files you need to specify which icon to use with a comma and then say which icon you are going to use. (my.exe,0 or my.dll,-50). Each desktop item has a unique screen that identifies it so make sure you use the right string for each item.
[主題]部分的其余部分將告訴窗口哪些圖標用于桌面圖標(計算機,文檔,回收站,網(wǎng)絡)。 對于圖標文件,您可以使用獨立的.ico文件,也可以使用嵌入在.exe或.dll文件中的圖標。 對于.exe和.dll文件,您需要指定要用逗號使用的圖標,然后說出要使用的圖標。 (my.exe,0或my.dll,-50)。 每個桌面項目都有一個唯一的屏幕來標識它,因此請確保為每個項目使用正確的字符串。
Computer = [CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon] Documents = [CLSID\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\DefaultIcon] Network = [CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\DefaultIcon] Recycle Bin = [CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon
計算機= [CLSID \ {20D04FE0-3AEA-1069-A2D8-08002B30309D} \ DefaultIcon]文檔= [CLSID \ {59031A47-3F72-44A7-89C5-5595FE6B30EE} \ DefaultIcon]網(wǎng)絡= [CLSID \ {F02C1A0D-BE21-4350- 88B0-7367FC96EF3C} \ DefaultIcon]回收站= [CLSID \ {645FF040-5081-101B-9F08-00AA002F954E} \ DefaultIcon
Below each item you will specify the icon with DefaultValue except the Recycle Bin which will use values Full and Empty.
在每個項目下方,您將使用DefaultValue指定圖標,但“回收站”將使用“滿”和“空”值。
After the [Theme] section is the optional [Control Panel\Colors] and [Control Panel\Cursors] sections. The colors section would be extremely hard to adjust manually but if you really want to try it you can adjust the following items using RGB codes.
[主題]部分之后是可選的[控制面板\顏色]和[控制面板\光標]部分。 顏色部分將很難手動調(diào)整,但是如果您真的想嘗試,可以使用RGB代碼調(diào)整以下項目。
Note: RGB codes range from 0-255 and are separated by spaces. So black is 0 0 0 and white is 255 255 255.
注意:RGB代碼范圍為0-255,并用空格分隔。 因此,黑色為0 0 0,白色為255 255 255。
ActiveTitle, Background, Hilight, HilightText, TitleText, Window, WindowText, Scrollbar, InactiveTitle, Menu, WindowFrame, MenuText, ActiveBorder, InactiveBorder, AppWorkspace, ButtonFace, ButtonShadow, GrayText, ButtonText, InactiveTitleText, ButtonHilight, ButtonDkShadow, ButtonLight, InfoText, InfoWindow, GradientActiveTitle, GradientInactiveTitle
ActiveTitle,背景,Hilight,HilightText,TitleText,Window,WindowText,Scrollbar,InactiveTitle,菜單,WindowFrame,MenuText,ActiveBorder,InactiveBorder,AppWorkspace,ButtonFace,ButtonShadow,GrayText,ButtonText,InactiveTitleText,ButtonHilight,ButtonDkShadow,ButtonLight,InfoText,InfoWindow, GradientActiveTitle,GradientInactiveTitle
Instead of doing this section by hand you could also adjust the colors using the control panel > personalize > colors, and then save the theme file and then just copy and paste the colors section into the theme you want.
除了手動完成此部分,您還可以使用控制面板>個性化>顏色來調(diào)整顏色,然后保存主題文件,然后將顏色部分復制并粘貼到所需的主題中。
The [Control Panel\Cursors] section has an option for which .cur or .ani files you want to use for each cursor. The valid cursors you can replace are the following:
[Control Panel \ Cursors]部分具有一個選項,您要為每個光標使用.cur或.ani文件。 您可以替換的有效游標如下:
Arrow, Help, AppStarting, Wait, NWPen, No, Size, SizeWE, Crosshair, IBeam, SizeNWSE, SizeNESW, SizeAll, UpArrow
箭頭,幫助,AppStarting,等待,NWPen,否,大小,SizeWE,十字線,IBeam,SizeNWSE,SizeNESW,SizeAll,UpArrow
If not cursor is defined the system defaults will be used.
如果未定義光標,將使用系統(tǒng)默認值。
After these two sections comes the first mandatory section and that is the [Control Panel\Desktop] section. If you do not have this part of the file the theme will not be recognized as a valid theme. In here you will specify what the wallpaper image will be, how the image will be displayed and if the image is tiled or not. The three values you need are Wallpaper, TileWallpaper, and WallpaperStyle.
這兩個部分之后是第一個必需部分,即[Control Panel \ Desktop]部分。 如果您沒有文件的這一部分,則該主題將不會被識別為有效的主題。 在此處,您將指定墻紙圖像,顯示圖像的方式以及是否將圖像平鋪。 您需要的三個值是Wallpaper,TileWallpaper和WallpaperStyle。
Wallpaper can be a .bmp, .gif, .jpg, .png, or .tif file. TileWallpaper is either a 1 or 0; 1 indicates the wallpaper should be tiled while 0 disables the tile. WallpaperStyle can be the following values. 0 means the image is centered, 2 means the image is stretched, 6 will fit the image to the screen, or 10 will will resize and crop the image to fit the screen.
墻紙可以是.bmp,.gif,.jpg,.png或.tif文件。 TileWallpaper是1或0; 1表示應平鋪墻紙,而0則禁用平鋪。 WallpaperStyle可以是以下值。 0表示圖像居中,2表示圖像被拉伸,6表示圖像適合屏幕,或者10表示將調(diào)整大小并裁剪圖像以適合屏幕。
After you have the [Control Panel\Desktop] section defined you can move on to the next optional section [Slideshow]. [Slideshow] is how you can make rotating backgrounds for Windows 7. This section has the following attributes: Interval, Shuffle, RSSFeed, ImagesRootPath, Item*Path (* represents which pictures will be included in the slide show). The attributes can be defined with the following values: Interval shows the amount of time to wait before changing the wallpaper image (in milliseconds), Shuffle is a 1 or 0 to determine if images are displayed in alphabetical order or shuffled, RSSFeed points to the URL of the images RSS feed you want to use, ImagesRootPath is the folder containing your images, and Item*Path determines how many items are included in the slideshow. Each Item*Path entry points to one wallpaper image so you need to specify each image manually.
定義[控制面板\桌面]部分后,可以繼續(xù)進行下一個可選部分[幻燈片顯示]。 [Slideshow]是為Windows 7制作旋轉(zhuǎn)背景的方式。本節(jié)具有以下屬性:時間間隔,隨機播放,RSSFeed,ImagesRootPath,Item * Path(*表示幻燈片中將包含哪些圖片)。 可以使用以下值定義屬性:“間隔”顯示更改墻紙圖像之前要等待的時間(以毫秒為單位),“隨機播放”是1或0,用于確定圖像是以字母順序顯示還是隨機播放,RSSFeed指向您要使用的圖像RSS feed的URL,ImagesRootPath是包含圖像的文件夾,Item * Path確定幻燈片中包含多少個項目。 每個Item * Path條目都指向一個墻紙圖像,因此您需要手動指定每個圖像。
Note: ImagesRootPath and RSSFeed cannot be used together.
注意:ImagesRootPath和RSSFeed不能一起使用。
Following [SlideShow] is another optional section called [Metrics]. [Metrics] section shows dimensions of various display elements, such as the window border width, icon height, or scrollbar width. The NonclientMetrics and IconMetrics values are binary structures defined by NONCLIENTMETRICS and ICONMETRICS in winuser.h. In other words, you probably don’t want to edit this section by hand. If you are going to change the value of any window boarders I would suggest doing that through the control panel and saving the modified theme. Then export the [Metrics] section into your desired theme. Non-the-less, here is an example of a [Metrics] section.
[SlideShow]之后是另一個可選部分,稱為[Metrics]。 [度量]部分顯示了各種顯示元素的尺寸,例如窗口邊框?qū)挾?#xff0c;圖標高度或滾動條寬度。 NonclientMetrics和IconMetrics值是winuser.h中的NONCLIENTMETRICS和ICONMETRICS定義的二進制結(jié)構(gòu)。 換句話說,您可能不想手動編輯此部分。 如果要更改任何窗口邊框的值,我建議您通過控制面板進行操作并保存修改后的主題。 然后將[Metrics]部分導出到所需的主題中。 盡管如此,這是[Metrics]部分的示例。
Next is the required [VisualStyles] section. This section allows you to point to a .msstyles file that can be modified for customization. If you use a .msstyles value in this section you will need to remove the [Metrics] and [Color] sections of your theme because the .msstyles will replace both of those sections.? The valid attributes are Path, Color, Composition, Size, ColorizationColor, and Transparancy. These options makes it easier to customize an already existing theme. For example, if you set the path attribute to %SystemRoot%\resources\Themes\Aero\Aero.msstyles you can easily begin customizing the default Windows Aero theme.
接下來是必需的[VisualStyles]部分。 本部分允許您指向。 可以修改以進行自定義的msstyles文件。 如果在此部分中使用.msstyles值,則將需要刪除主題的[Metrics]和[Color]部分,因為.msstyles將替換這兩個部分。 有效屬性是“路徑”,“顏色”,“成分”,“大小”,“ ColorizationColor”和“透明性”。 這些選項使自定義現(xiàn)有主題變得更加容易。 例如,如果將路徑屬性設置為%SystemRoot%\ resources \ Themes \ Aero \ Aero.msstyles,則可以輕松地開始自定義默認的Windows Aero主題。
Following [VisualStyles] is the optional [Sounds] and [AppEvents] sections. For this section you can either specify each sound manually by using the path to a .wav file like so: [AppEvents\Schemes\Apps\.Default\SystemExclamation] DefaultValue=
[VisualStyles]之后是可選的[Sounds]和[AppEvents]部分。 對于此部分,您可以通過使用.wav文件的路徑手動指定每種聲音,如下所示:[AppEvents \ Schemes \ Apps \ .Default \ SystemExclamation] DefaultValue =
Or you can specify one of the built in sound schemes with SchemeName= You can use one of the built in sound schemes or specify the .dll file containing the theme.
或者,您可以使用SchemeName =指定一種內(nèi)置聲音方案。您可以使用一種內(nèi)置聲音方案或指定包含主題的.dll文件。
Following [Sounds] is the [Boot] section. The [Boot] section only has one value for SCRNSAVE.EXE point this value to whatever .scr file you want to use for your screensaver.
[聲音]后面是[啟動]部分。 [啟動]部分只有一個SCRNSAVE.EXE值,將此值指向您要用于屏幕保護程序的任何.scr文件。
Finally is the required [MasterThemeSelector] which only has one attribute and you don’t have a choice for the value. The only thing that goes in this section is MTSM=DABJDKT which indicates that the theme is valid.
最后是必需的[MasterThemeSelector],它只有一個屬性,您沒有選擇該值的方法。 本節(jié)中唯一要做的是MTSM = DABJDKT,它指示主題有效。
Once you have all of the required and optional sections in the file, save the file to whatever you want to call it and change the extension from .txt to .theme. Make sure you are viewing known file extensions when changing the extension otherwise the true extension will be hidden.
文件中包含所有必需和可選部分后,將文件保存到要調(diào)用的文件中,并將擴展名從.txt更改為.theme 。 更改擴展名時,請確保您正在查看已知的文件擴展名,否則真正的擴展名將被隱藏。
Packaging your theme pack
包裝主題包
The final step it to package all of your media into a .themepack file. The .themepack file is simply a .cab file with an extension change. So if you already have software that can create a .cab file, simply use that software to compress your theme folder with all of your media in it and change the extension. If you don’t already have a cab packing program you can check out CabPack which is freeware.
最后一步,將所有媒體打包到.themepack文件中。 .themepack文件只是具有擴展名更改的.cab文件。 因此,如果您已經(jīng)擁有可以創(chuàng)建.cab文件的軟件,只需使用該軟件壓縮包含所有媒體的主題文件夾并更改擴展名即可。 如果您還沒有出租車打包程序,可以簽出免費的CabPack。
Here’s an example of the Matrix Theme we built from scratch.
這是我們從頭開始構(gòu)建的矩陣主題的示例。
Conclusion
結(jié)論
Once you have your theme pack you can apply it to your own system before sharing it. If there is anything else that needs tweaking you can either go back and change it in your .theme file your you can change it through the Windows GUI and then re-save the theme for sharing. Now go out there and share your favorite theme tweaks with the rest of the world.
擁有主題包后,可以在共享主題包之前將其應用于自己的系統(tǒng)。 如果還有其他需要調(diào)整的地方,則可以返回并在.theme文件中進行更改,然后可以通過Windows GUI進行更改,然后重新保存主題以進行共享。 現(xiàn)在去那里,與世界其他地方分享您最喜歡的主題調(diào)整。
Links
鏈接
Microsoft theme pack reference CabPack
Microsoft主題包參考 CabPack
翻譯自: https://www.howtogeek.com/howto/24609/create-a-windows-7-theme-pack-from-scratch/
從頭開始vue創(chuàng)建項目
總結(jié)
以上是生活随笔為你收集整理的从头开始vue创建项目_从头开始创建Windows 7主题包的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 朗伯辐射强度模型MATLAB,基于室内非
- 下一篇: vue 下载文件(后台返回为二进制流)